May 2008 Entries

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...

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