Hibernate version:2.x
Name and version of the database you are using: SQL Server 2000
All,
I have been having some problems with XML serialization of domain objects, which we have designed to be persisted using hiberanate to SQL server database.
Example domain object:
---------------------------
User
(attributes) First Name
(attributes) Last Name
(attributes) LoginName
(attributes) Address ---- one to many relation
Address
(attributes) Street
(attributes) City
(attributes) State
(attributes) User as Parent ---- many to one relation
We followed the object design specs as per the hibernate guidelines with parent/child relationship.
We have no problems with basic persistance of this object, things are working fine, but we have run into issues with XML serialization of User object across to different machine (client / server application), basically we are using SOAP serializer to serialize the User object, which would take every member variable & use the BeanSerializer to serializer.... this is leading to infinite looping of serialization while serializing Address attribute, because BeanSerializer for Address will take one of the the attribute of Address the User and again trigger User serialization, this is leading to infinite looping.
Please suggest me.. the best practise in data modelling to avoid such serialization issues.
-Bhaskar
|