| Justin Patrin 2005-10-24, 6:57 pm |
| On 10/24/05, Sebastian Ganschow <sebastian@ganschow.net> wrote:
>
> Justin Patrin schrieb:
>
field[color=darkred]
> Hi,
>
> but i thought, if I set ignore_sequence_keys to ALL, Dataobject will use
> the native support
> for getting the id of the last inserted element.
>
> The documentation of this configuration option says:
> " If you do not want to use pear's nextval(), for automatically filling
> in sequences,
> this can disable it for "ALL", or a list of tables "person,cart,group""
>
> And the phpDoc for method insert() says:
>
> "*Return:* false on failure, int when auto increment or sequence used,
> otherwise true on success"
>
> So I don't want to use sequence keys, but the auto increment.
> If this behavior is correct, how can I use auto increment.
>
If you're using mysql you don't have to do anything. It will work
without any options set. If you're using another DB try it. If it
doesn't work you probably need to override sequenceKey() for your DOs
and return the correct values.
--
Justin Patrin
|