Hello,
I have the following problem with NHibernate in ASP.NET:
I am databinding my object to a formview using standard asp.net databinding, with an object datasource to specify how to retrieve and save the object.
The problem is: when saving, a new object is created with the relations not filled in yet. For example: For a Customer object, the ContactInformation relation is "null". NHibernate expects it to be filled in when saving my Customer object (or at least have a proxy in place).
I am wondering about a good practise on how to solve this. Off course, I can always refetch the Customer object from DB and alter the values that are changed in the UI, but that seems like a lot of unnecessary code.
Any best practises on this?
Regards
EDIT: I found
http://www.codeproject.com/KB/aspnet/NH ... ource.aspx. Is this a good way to do it? (seems to be buggy and not up to date)