Re: Getting a newly created record
Dieter Maurer <[email protected]>
| Newsgroups | gmane.comp.web.zope.database |
|---|---|
| Message-ID | <[email protected]> |
Sean Fulmer wrote at 2005-11-17 17:04 +0000: >How can I insert a new record and have the new record immediately returned to me >as an object? You must use database means for this. If your database system supports the "sequence" datatype (and you use it to generate a unique id) then you can use the sequence's "curval" to reference the newly created record. You can combine your insert and a select for the created record in the same Z SQL Method (separated by "<dtml-sql-delimiter>" (or similarly spelled). -- Dieter