[postmodern-devel] Defer creation of sequence ids?
Marijn Haverbeke
marijnh at gmail.com
Sun Jun 17 08:15:11 UTC 2007
Hello Vamsee,
You make a good point. However, sometimes it is useful to have the id
of your new object before saving it. The next-id function can be used
for that, of course. But deferring the creation of ids for all DAO
objects might break some existing code. How moving the initialization
of the auto-id field to an initialize-instance method, which only does
it if no :defer-id (or something similar) keyword arg is given? Then,
save/insert-dao could check whether the id field has a value, and
initialize it when it does not.
Regards,
Marijn
More information about the postmodern-devel
mailing list