You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Da...@WellsFargo.COM on 2002/03/30 01:35:33 UTC
When are ids fetched from the ID broker?
Does it happen when you create the object?
Foo myFoo = new Foo();
Or does it happen when you save the object?
myFoo.save();
Thanks!
David A. Ventimiglia
Wells Fargo Private Client Services
(415) 396-0414 (work)
Re: When are ids fetched from the ID broker?
Posted by Bill Schneider <bs...@vecna.com>.
Torque will not create an object ID for a new object until that object is
.save()'d regardless of whether you're using an IDBroker or a native
sequence/autoincrement column.
Note that if you use the IDBroker, you can pre-fetch and set the next ID
(the ID that the next saved object *will get* when saved) if you want. This
is useful for double-click protection in webapps.
-- Bill
Another important thing to note is that the IDBroker
> When it is saved.
>
> David.A.Ventimiglia@WellsFargo.COM wrote:
> >
> > Does it happen when you create the object?
> >
> > Foo myFoo = new Foo();
> >
> > Or does it happen when you save the object?
> >
> > myFoo.save();
> >
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: When are ids fetched from the ID broker?
Posted by John McNally <jm...@collab.net>.
When it is saved.
David.A.Ventimiglia@WellsFargo.COM wrote:
>
> Does it happen when you create the object?
>
>
>
> Foo myFoo = new Foo();
>
>
>
> Or does it happen when you save the object?
>
>
>
> myFoo.save();
>
>
>
> Thanks!
>
>
>
>
>
> David A. Ventimiglia
>
> Wells Fargo Private Client Services
>
> (415) 396-0414 (work)
>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>