-->
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.  [ 1 post ] 
Author Message
 Post subject: dynamic onetomany
PostPosted: Thu May 27, 2010 9:45 am 
Newbie

Joined: Thu Apr 15, 2010 1:57 pm
Posts: 9
Hello Friends,

I have post my question on NHibernate forums and also posting it here just incase someone working with hibernate can help. I came across this link from Ayende with explains the adding the manytoone property at run time to an persistent class. "http://ayende.com/Blog/archive/2008/05/01/Dynamic-Mapping-with-NHibernate.aspx"
I have a requirement in which I have to add a manytoone property to the children class and also add onetomany property to parent class.

I was able to add the manytoone as shown by Ayende but when following the similar approach for onetomany I am getting an error as "Operation is not valid due to the current state of the object".

I debugged the NHibernate source code and the exception is coming from the “CheckPropertyColumnDuplication” method of “NHibernate.Mapping.PersistentClass”. In this method there is a conditional OR check on IsUpdateable and IsInsertable properties of the new property we add to the class and these properties are throwing the exception.

Can anyone help me ?

Thanks


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

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.