[odb-users] Temp Ids
Boris Kolpackov
boris at codesynthesis.com
Fri Dec 12 04:39:39 EST 2014
Hi Erez,
Erez Pics <picserez at gmail.com> writes:
> 1) Is there a problem using negative and positive identifiers together
> with SQLite and ODB ?
I don't think there will be any.
> 2) Assuming it's legal, and we decide to update a temp identifier to
> permanent, ON UPDATE CASCADE is enough to automatically update all
> dependent FKs ?
I think so, though ODB currently has no support for adding the ON
UPDATE clause in the generated schema (added to the TODO list).
Also, it seems to me there is a lot simpler way to achieve what
you want: a bool 'temporary' flag in the object. This way you don't
need to mess with updating foreign keys, etc. And you can use auto
ids.
Boris
More information about the odb-users
mailing list