NHibernate

ActiveRecord, NHibernate and SQL Stored Procedures

I love ActiveRecord and NHibernate as ORMs. They do exactly as it says on the tin. I love the fact that I can develop an application in a DDD (Domain Driven Development) fashion and almost forget about the fact that I need a relational database. I also love the fact that I don't have to write lengthy Stored Procedures to get data back....but there is always an application out there where this has to change. I currently working on a new project that requires a lot of reporting and data warehousing, so it has come to the point where I will require...

NHibernate & foreign key constraints

When I allow NHibernate to generate the schema for my object graph I get an issue with foreign key constraints on collections. I'm I can't be the only person that has come across this problem!? I'll try and outline it for you. Ps. At the end of this post I do have a solution! I have an abstract base class that has a simple IList<string> public abstract class VariationBase : DomainBase {     public IList<string> OtherVariations { get; set; } } Then I have a number of other classes that inherit from VariationBase (The idea being that each class could have a title variation for example). When NHibernate...

NHibernate 2.0 Alpha

NHibernate 2.0 Alpha has been released last night. NHiberbnate is the engine behind ActiveRecord, so I'm looking forward to the new changes (having said that I have been using NHibernate 2.0 from the trunk in production for a while now!)  Check out Ayende's blog for more details.

ActiveRecord & NHibernate.Linq

I've been doing a lot of work with Castle's ActiveRecord. In order to get my data back from the database I have been doing queries like: var activities = Repository.FindAll<Activity>(Expression.Eq("Status", StatusEnum.Published) This works great, except for having to use a string for the property I want to set my expression for. How about this: var mostPopularActivities = Repository.SlicedFindAll<Activity>(new[] { "Categories" }, 0, 5, new[] { new Order("ViewCount", false) }, Expression.Eq("Categories.Id", category.Id), Expression.Eq("Status", StatusEnum.Published)); Anybody understand this? Now it's getting really complex. What we are saying is "Get me all the activities and join categories, and get me rows 0 - 5 (top 5), and...

WP Theme &Icons by N.Design Studio adapted by timheuer and ruined by rodj!