[odb-users] Re: about use libodb-oracle

Boris Kolpackov boris at codesynthesis.com
Wed Sep 26 07:43:24 EDT 2012


Hi Scott,

Scott Zhang <macromarship at gmail.com> writes:

> When odb insert row into database, looks it random insert some value into
> the ID field.

Prior to 2.1.0 ODB used a sequence and a trigger combo to implement
auto object ids. That trigger would use the next sequence value 
regardless of the value specified in the INSERT statement.

In 2.1.0 we simplified this by getting rid of the trigger and just
using the sequence directly. So now the generated INSERT statement
looks like this:

INSERT ... VALUES (MEMBER_seq.nextval, ...)

The name of the sequence is derived by appending _seq to the class
name.

Boris



More information about the odb-users mailing list