just take the object instance that was just flushed() and pull the primary key from the attributes of the object itself. such as instance.bldcmdid, if thats the attribute you want.
as for your double primary key problem, id have to see what youre doing (i.e. whos creating the tables, you or SA ? whats the DDL look like ? what does your mapper look like ? what do the instances youre flushing look like ?). youre putting a sequence on a non-primary key column up there, so SA has nothing to do with that...it will send a value through if your object has a value for the corresponding attribute, otherwise sends nothing. for primary key columns that are specified with SERIAL or otherwise have a sql-level default, SA is going to pre-execute the sequence and send the value in with the insert, so theres no double-sequence issue with regards to primary key columns. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to [email protected] 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 -~----------~----~----~----~------~----~------~--~---
