[odb-users] Temp Ids
Erez Pics
picserez at gmail.com
Fri Dec 12 16:20:35 EST 2014
Hi Boris,
Thank you for your quick response.
The idea to use temp ids allow us to use real object connections, real
objects and real queries,
meaning, it's a complex object model in which temp objects are
connected to other temp objects and to permanent existing objects.
Using temp Ids, we keep using the DB as the backend infrastructure for
persisting and fetching all objects, without it we would probably need
to implement a separate flow to all temp object maintaining all their
hierarchy and logic paths as their permanent counterparts.
Thank you very much,
Erez.
On Fri, Dec 12, 2014 at 11:39 AM, Boris Kolpackov
<boris at codesynthesis.com> wrote:
> 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