There is a problem in your bean. please check for this code. Every object of Asset in the Collection should in turn have the relationship with the WorkLocation. That is you might have got function like this in WorkLocation
public void addAsset(Asset _asset){ asset.add(_asset); _asset.setWorkLocation(this); } otherwise before saving you would have to iterate through the collection of asset. And set _asset.setWorkLocation(workLocation); where asset is some collection (List, Set, Map) regards prasad chandrasekaran ----- Original Message ----- From: "dosapati" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, October 06, 2003 6:56 PM Subject: [Hibernate] relationship not getting saved > I dont know wheteher I can post this question here or not. Please let me > know if there is any other users group. > > I am facing this problem with one-to-many association. > > association is not getting saved with one-to-many relation class, but it is > getting saved with many-to-one relation class. > > Example: WorkLocation - to - Asset is one-to-many. And Asset - to - > WorkLocation is many-to-one relation. > When An Asset entity is set with WorkLocation object and the Asset is saved, > the association Asset-to-WorkLocation is getting saved. > when a Collection of Assets is set to WorkLocation object and the > WorkLocation object is saved, the association Asset-to-WorkLocation is not > getting saved. > > thanks > Dosapati > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > hibernate-devel mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/hibernate-devel ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel