views:

223

answers:

2

I am currently testing using NHibernate Fluent Automappings to map my domain objects and create my database schema.

Is this a good or bad idea?

+3  A: 

Testing the mappings seems like a good idea to me.

I am using Fluent NHibernate for a project right now, though not the automappings (I have one small design problem with a class I need to refactor before automapping would work for me).

The thing I like about NHibernate, and specifically Fluent Nhibernate, is that if you are going to use these tools, and the automappings, they have a tendency to "steer" your design toward a certain direction, with certain conventions.

On the project I am working on now I started with ADO.Net, went to NHibernate with XML mappings, then Fluent Nhibernate, and now trying to get the AutoMappings to work. At each step of the way I've had to refactor some aspect of my entity design or the database - for the better. So not only are these tools great, they help steer you toward some good designs. And I think with the automappings, this is easier to accomplish if you start with them from the get-go.

Chris Holmes
+1  A: 

Should you trust anything implicitly? No.

There's very little that's dangerous about Auto Mapping, even less if you test it. There's an active community if you get stuck with anything too.

James Gregory