I'm thinking, why actually NHibernate require entities to have parameterless constructor. I know that I can make it non-public, but still, for a lot of entities it simply smells. For example, it doesn't make sense to have a customer without name, or Order without Item. To throw a buzzword at you, it's persistence-ignorance hole. A requirement I must satisfy in order to use certain persistence mechanism. What if, instead NHibernate was smart enought to use the non-default constructor? for example if I have a customer class
public class Customer { private readonly string name; public Customer(string name){...} public string Name { get {...}} } Why can't NHibernate figure it out how to create a customer, when it already has all it needs (a name). Does it make even sense? Cheers, Krzysztof --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to nhusers@googlegroups.com To unsubscribe from this group, send email to nhusers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nhusers?hl=en -~----------~----~----~----~------~----~------~--~---