Yes, thats true. It's a thing to watch out for.. Someone suggested that you could use maps to contain your temporary variables in (a lot easier than having duplicate classes), and you can use that as well in compound models etc..

cretzel wrote:
Thanks for the immediate replies.

Seems that, when using that pattern, one really always has to be aware of
the fact that changes are made directly to persistent instances. Otherwise
it could easily happen to get inconsistent data into the DB.


Michael Sparer wrote:
I'd say either enable transactions only for write operations or put all
together in one transaction (i.e. don't let hibernate flush the session
before you did your backend checks) ...


This works if each request is a single transaction. If multiple transactions
are run in one request, this wouldn't help, I think.


igor.vaynberg wrote:
map a form to a bean and apply the changes to the entity yourself or do
all validation via I(Form)Validators


The first solution sounds like using DTOs and one reason of using OSIV is to
not to have to use DTOs.
But I like the FormValidator solution. That should work in most cases.

Regards




--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to