Hi all,

I just experienced a strange behaviour  of  SequenceManagerNextValIpl (I
guess) following migration from OJB 1.0.1 to 1.0.4.

To build an object, i need the value of the id before writing it to the
database So i use

Identity oid = broker.serviceIdentity().getIdentity(objectNewInstanciated);
//(broker is different from tx one)

and read pk value with:

oid.getPrimaryKeyValues()[0]

At this point, my id is 1001 and object is not in database. Note that my
database sequence is 975 !!

And after tx.commit(), surprise, object is created  with the right id, 975.

I don't understand anything at this. Why the id is not the final id (as it
's using OJB 1.0.1)?
Any setting idea ?

OJB 1.0.4
pk setting : autoincrement="true" sequence-name="SEQ_CALCUL"
primarykey="true" access="anonymous"

SequenceManager  : autonaming="false"

Thanks

Reply via email to