Hi friends!
We're facing here the  NonUniqueException - a different object with the same
identifier value was already associated with the session. Googling about
that we've found almost the same orientations: use of evict. Even using it,
the exception persists.

My domain is like that: class Course has a list of Subjects. An Student can
select from that list, the subjects he want take part.

So, in my screen user enters the course number. System loads the course and
its subjects. Internally we clone that list to another list. Now user create
a new Student, and in a grid (binded to cloned list), user selects what the
student wants to take part.

After created all students, we tried to save the students, and we got the
exception... we changed to save the course, and we got same exception...

We use uNHAddins CpBT, so  think it is important to say how we are doing
things:

- We have a service class, decorated with CpBT attributes.
- First locate and load the course object and its subject List and make a
CpBT commit.
- For each new student, I clone that subject list, and associate it to the
student.
- So the subject student list is binded to the grid.

After adding all students, I tried to save each one... but with no sucess.

As you can see, Course points to Subjects(One to Many), Student points to
Subject (Many to Many) but Subject does not point back to Student...

After loading the course, I´ve tried to do a Session.Evict for each Subject,
but with no sucess...

I dont know anything more.. are´re stucked on this situation... any
suggestion is welcome.

-- 
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