Hi All, I like to have your opinion about something.
In a project I am working on a lot of mistakes were made when creating the 
NHibernate mappings. Most of those mistakes were made around collections 
and cascading. When we found out, I started to write unittests for those 
collections to prove that the problems were in the mappings and not in 
NHibernate. So for each mapped entity I am writing tests to prove that I 
can do simple crud actions, entities in the collections are deleted or just 
dereferenced when the entity gets deleted. That kind of stuff... On one 
side this is to make sure the mappings are correct (which helps a lot with 
the mappings for the collections), on the other side it is  to make sure we 
don't change the mapping without making sure we need to.

But now I am at the point where I think "How far should I go", which is of 
course a question you could not answer, but I can be more specific. Should 
I try to tests things like nullability, when our database creation scripts 
are also specifying it? Should I try to test that a many-to-one mapping is 
not lazyloaded, or it's cascading is set to None?

So are you guys testing your mappings? And how far do you go?

Greetings,
David

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/d/optout.

Reply via email to