Thank you.

-Neo707

On Apr 24, 1:32 am, "Wolfgang Trog" <[email protected]> wrote:
> As the exception says you have more than one instance of an object with the
> same id. What kind of ids do you use ? Assigned ? Can you post the code
> where you generate your objects ?
>
> --
> Wolfgang
>
>
>
> -----Original Message-----
> From: [email protected] [mailto:[email protected]] On Behalf
>
> Of neo707
> Sent: Donnerstag, 23. April 2009 20:20
> To: nhusers
> Subject: [nhusers] Problem with Cascading Update and Intermediate
> Association
>
> Hello,
>
> I'm new to NHibernate but learning quickly.  I'm stuck on an issue and
> I was hoping you could help me out...
>
> Here's my scenario :
>
> I have 3 Classes participating in a many-to-many relationship through
> an intermediate association.
>
> 1.) Class Photo (key=PhotoID): a class representing a photo; it has a
> one-to-many relationship with TagValue
> 2.) Class TagValue (fkeys=PhotoID,TagID): an intermediate class/
> association with a many-to-one relationship with both Blog and Tag.
> 3.) Class Tag : a class representing a tag that someone might assign
> to a photo.  The Tag is special in that it can have a value in
> addition to a name; Tag has a one-to-many relationship with TagValue;
>
> The Photo class has a one-to-many relationship with TagValue.
>
> When I try to do Session.SaveOrUpdate(Photo), I get the following
> error message :
> "Unable to add photo. Error: a different object with the same
> identifier value was already associated with the session: 1, of
> entity: Tag"
>
> This error occurs when I have multiple tags (with the same text but
> different value)) associated to the same Photo.
>
> Thanks for your help,
> -Neo707- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to