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

Scott Zhang macromarship at gmail.com
Wed Sep 26 07:30:59 EDT 2012


Hi. Boris.
    Well. Your new way will need me to change the name of existing seq. But
anyway it works. We just need to keep the sequence name following the odb
rules. And your way is compatible with the default trigger way (which php
code needs) so it is ok.


Regards.
Scott

On Wed, Sep 26, 2012 at 7:43 PM, Boris Kolpackov <boris at codesynthesis.com>wrote:

> 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