Andy Schwartz wrote:
Thanks Pete -
Pete Muir wrote:
> The issue is that it isn't always (normally IMO) the case that you
> want the model update on an ajax request to do validation, you only
> want the model updated when you actually hit submit... This is a
> problem if you are applying values directly to the managed JPA
> entities which get flushed to the database at the end of the TX.
>
What are the consequences of applying a validated value to a managed
entity early - ie. during Ajax validation, as opposed to waiting until
the full submit? Is there some overhead here that you want to avoid?
Presumably the value is not being flushed to the database immediately
(as you said, this won't happen until the end of the TX),
Oh, actually... So is the deal that your are committing the TX in
response to the Ajax validation, and thus the value is actually being
flushed to the database immediately?
Andy