> > I've been coding some
> > examples with convoluted entity lazy-loaded associations and, despite
> > my previous fears, detaching/re-attaching it from/to the hibernate
> > session works like a charm. I think I will tag all my editable
> > entities as Serializable and embrace this approach.
>
> S
> > the object is reloaded just for setting a property and discarded
> > again; also, depending on how you configure your transactions, you
> > could end up persisting partial non-validated changes (although I
> > should say that from my observations this doesn't happen inside a
> > vanilla OpenSes
> Also, reloading the entity from "state zero" every time could be
> problematic when incrementally updating it using ajax.
Not if you save it every time :) But yes, if you do an update in
steps, and only want to commit changes at the end (relevant not only
with Ajax, but also e.g. with a wizard)
On 4/6/07, Carlos Pita <[EMAIL PROTECTED]> wrote:
> On 4/6/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
> > > It's not a good idea to use LoadableDetachableModel for entities that
> > > you edit. Because they are detached after every request.
> >
> > Sorry, but I don't agree with that :) LDMs are
> On 4/6/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
> > > It's not a good idea to use LoadableDetachableModel for entities that
> > > you edit. Because they are detached after every request.
> >
> > Sorry, but I don't agree with that :) LDMs are my favorite models for
> > such use. The only thi
>
> If it works well, anything outside of a transaction should well... be
> outside the transaction :) So anything touched in a read-only (auto
> started) transaction should never be upgraded to a write one. I'm not
> a Spring expert though. But that's what you can expect from the
> library.
This
On 4/6/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
> > It's not a good idea to use LoadableDetachableModel for entities that
> > you edit. Because they are detached after every request.
>
> Sorry, but I don't agree with that :) LDMs are my favorite models for
> such use. The only thing you have
> Anyway, I've done little tests with spring OpenSessionInViewFilter and
> things DO work as I desire. I mean changes are committed only when a
> @Transactional method is invoked, not during events that simply update
> the model without submitting.
Imo, have separate transaction methods (service/
> It's not a good idea to use LoadableDetachableModel for entities that
> you edit. Because they are detached after every request.
Sorry, but I don't agree with that :) LDMs are my favorite models for
such use. The only thing you have to keep in mind is to persist any
changes coming in with a requ
Hi Matej,
what about entities with lazy loaded associations that are not easily
detachable/re-attachable from/to their hibernate session? I was never
sure on how to do this, maybe dto is a healthier alternative despite
introducing a lot of duplication.
Anyway, I've done little tests with spring O
It's not a good idea to use LoadableDetachableModel for entities that
you edit. Because they are detached after every request.
LoadableDetachableModel is best for View scenarios, when you need
fresh data on every request. In case you are editing entities, like
you do, load the entity only once, e.
Same can be said for ajax update behaviour. See for example:
TextField password = new TextField("password");
AjaxFormComponentUpdatingBehavior ajaxBehaviour =
new AjaxFormComponentUpdatingBehavior("onblur") {
protected void onUpdate(AjaxRequestTarget target) {
System.out.pr
Hi all,
I'm a bit concerned about onSelectionChanged event effectively binding
my model. Suppose my model is a LoadableDetachableModel that is loaded
from the repository every time. Normally (upon form submission)
nothing will be bound after successfully passing validation; then
additional logic w
13 matches
Mail list logo