Werner Punz wrote:
To me, it makes sense to use Transfer Objects,
* How do you deal with versioning?
To enable versioning, you have to set a version field in your table,
I tried that approach with my last JSF project, it works like a charm...
I know this, and I use it myself already.
The question is what if one use "Transfer Objects" they are detached
from the hibernate object itself, arent they?
So the workflow with transfer objects is:
* DAO->hibernate->Transfer Object
* request,response
* reload hibernate object from database and apply the transfer object
values on it
If you use this scheme, your are not able to rely on hibernates
versioning as you always load the current version of the object from the
database and override its values.
The point is (if I understand the Transfer Object stuff correctly) that
transfer objects arent a good solution.
Ciao,
Mario