These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: NHibernate databinding in ASP.NET
PostPosted: Tue Jul 01, 2008 2:48 am 
Newbie

Joined: Tue Jul 01, 2008 2:37 am
Posts: 15
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)


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 02, 2008 3:24 am 
Newbie

Joined: Tue Jul 01, 2008 2:37 am
Posts: 15
Is this a tough question, is it perhaps badly formulated, or am I the only one working with ASP.NET, NHibernate and normal data binding?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.