> > Can you please let me know where to start looking to implementing > > this? I can give it a shot if I get some time. > > UnmarshalHandler and IDResolver are the two primary places that would > require changes.
Thanks ! I will look into this sometime. I feel that if equals method is generated for KeyRef Class, then comparision shouldn't be very different for KEYREF from IDREF. > If you experiment with ID and IDRef you'll see that the Castor > UnmarshalHandler adds the actual object reference for IDREF. When you > marshal, the ID is obtained you only get the IDREF in the XML, but > during Unmarshalling Castor finds the object references and puts that > in the actual IDRef field. So basically this is the way it already > works. I tried it and it works just as you explained which makes it more usable. Though One problem with ID and IDREF approach is that when working with a huge project with a lot of referencing, to make the ID unique globally, I want to have separate attribute called ID for all elements that will be referenced. I don't want to set it everytime I create one of these objects. I want the constructor of the object to call some Factory Class to generate its own unique ID. Then the application needs not even worry about setting these IDs explicitly. Can the source generator be made to generate these calls automatically ? thanks, Saravanan > > --Keith > > > > ----------------------------------------------------------- > If you wish to unsubscribe from this mailing, send mail to > [EMAIL PROTECTED] with a subject of: > unsubscribe castor-dev -- Saravanan Subbiah ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev