Hi there, I'm struggling with a problem trying to find a means to have some kind of bidirectional associations between two tables.
One table represents questions, which has two different relations to an answer table playing different roles - one "yes"-answer and one "no"-answer. I tried to use two one-to-one mappings, but this doesn't work and I get the following error message: >>> ... NHibernate.NonUniqueObjectException : a different object with the same identifier value was already associated with the session: 1, of entity: Answer <<< The problem I guess is that there is no possibility to tell NHibernate about the different "roles" of the two mappings to the same table: >>> <one-to-one name="YesAnswer" class="Answer" cascade="all"/> <one-to-one name="NoAnswer" class="Answer" cascade="all"/> <<< Is there some other way to achieve my goal of having a bidirection assoc. between these two entities question and answer??? Thanks in advance, Marc --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nhusers?hl=en -~----------~----~----~----~------~----~------~--~---
