General interface and data storage mechanism for NHDomainMapper

Topics: Developer Forum
Oct 23, 2006 at 1:58 PM

It would be nice if - for beginners - NHDomainMapper shipped with an assembly(2,
really, one for 1.1 and another for 2.0 ) to be used to load all the necessary

I'm thinking something along the lines of( Pascal pseudo code, should be understandable tho ):


INHibernateInterface = interface
procedure Insert( AnObj : System.Object );
procedure Update( AnObj : System.Object );
function Read : System.Object;

Then you'd have implementing classes which load all the correct stuff in the correct order,
using defaults maybe - so that anyone can kick start using it immediately.

That would, imho, really speed up the usage of NHibernate for newcomers to the technology.

Thank you,

Oct 26, 2006 at 9:12 AM
The code snippet that you have written, smells like an "ActiveRecord Pattern" (Fowler), but this is an architectural discussion, not specifically concern with tool. Generally, I do not prefer to use Active Record pattern in favour of a Persistence Context Engine, outside the scope of Entities.
Also, with NHibernate you don't need to have an addictional factory to create entity,the session is already a factory.

For Nhibernate newbie kickstart, we could think, for example in a simple solution structure, ready to start...that's a good idea, for the future releases.