Hi,

 

I am trying to marshall my object model to XML.

I have the following problem within my object graph:

 

 

ROOT: student1 -> {course1, course2, course3} 

course1-> {student1, student2}

 

The above means "student1 has three courses (1,2,3) and course1 contains is
attended by two students (1,2). 

Notice the student1 in the collection of course1 is actually a reference
back to the root element student1.

 

When I marshall the above structure, I expect a reference in the collection
{student1,student2} of course1.

 

The thing is: ONLY student2 is present in the collection of course1 !
(Student1 has disappeared !...?? )

 

I checked with the Castor HOW-TOs with respect to the usage of references.

I declared identity attributes on all classes in my mapping. I declared the
attribute reference to true in the bind-xml tags.

I think I followed all steps properly.

 

But this seems not to work?

Can someone point me to the problem and solution?

 

 

Kind regards

Urso

Reply via email to