I am trying to pass domain objects down to the presentation layer via web services (AXIS), allow changes made to the disconnected data, send it back up and update the database.
For ease of use, I would like to pass the hibernate objects down themselves. This works fine until I introduce any relationships or collections.
The presentation layer does not need to be aware of the relationships. Is there a way I can create a base class with the persistent fields and a subclass with the relationships/collections?
The base class would be updated in the presentation layer and synched with hibernate--updating the fields but leaving the relationships or collections unchanged.
The synchronization with hibernate could be done using Beanutils to copy from my base class to the hibernate subclass if there is no way to have this happen automatically.
Is there another approach that might work
|