hi,

using the castor xml mapping, i would like to ask what would be the best way
to handle references between objects, especially objects that are referenced
by
more than one object.

e.g.

class Student {
  String name;
  List lectures;
}

class Professor {
  String name;
  List lectures;
}

class Lecture {
  String title;
}


Student and Professor objects each reference a list of Lecture objects
(the list of all the available Lectures is stored 'globally', as is the
list of all Students and Professors).

how do you handle this situation

1) in xml?
2) in the mapping framework?

the above example is also rather simple because it doesn't have to handle
the case of forward references in the xml file (you could list all the
Lecture objects in the xml file first, then Students and Professors, thus
avoiding forward references). the object model i need to map to xml
unfortunately has forward references. how do you handle these?

thanks in advance for answers to any of the above questions.

regards
patrick

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to