You should find it at z.USER_SID after the flush.

Not sure about your save() and flush() calls however....should be
session.save_or_update(z) and session.flush()



On 9/11/07, Lukasz Szybalski <[EMAIL PROTECTED]> wrote:
>
>
> Hello,
>
> I am saving to my column in this way. How do I get the primary key id
> back from database?
>
> >>> z=User()
> >>> z.LASTNAME='smith'
> >>> z.FIRSTNAME='joe'
> >>> z.save_or_update()
> >>> z.flush()
>
> How do I get my z.USER_SID which is my primary auto increment key in
> database.
> Lucas
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to