[postmodern-devel] Defer creation of sequence ids?
Vamsee Kanakala
vamlists at gmail.com
Sat Jun 16 23:27:48 UTC 2007
Hi,
I think, create-instance should defer the creation of an id (from
sequence-next), because, there are some times when an object is created,
but is not saved. For example, in a web application, I would need to
create an object so that I can fill in the slots from the form values,
but I might not save it, as it might have some validation errors.
It would save some sequence ids (a lot actually, as there might be
multiple rounds of validation errors) if I don't have to assign an id
unless it is being saved to the database. I think we could have
insert-dao/save-dao to retrieve a new sequence id if the column "id" is
not filled/nil/zero, and use an existing id if it's value is greater
than zero. If this sounds ok, I can create a patch.
Regards,
Vamsee.
More information about the postmodern-devel
mailing list