Alle lunedì 10 dicembre 2007, Marco Mariani ha scritto:
> Stefano Bartaletti wrote:
> > I need to gather IDs in after_commit because theID is a serial Postgres
> > value that is available only after flush()
>
> Not really... in postgres, you can ask to consume the next sequence
> value with SELECT NEXTVAL('sequence_name') and explicitly set that as
> primary key value.Thanks I already thougt of this solution, but if I need to do the same for different attributes that are not valued until flush I'm in trouble again -- Cordialmente Stefano Bartaletti Responsabile Software G.Tosi Spa Tintoria Skype account: stefano.bartaletti ICQ contact : 1271960 Viale dell'Industria 61 21052 Busto Arsizio (VA) Tel. +39 0331 34 48 11 Fax +39 0331 35 21 23 --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
