Hi Mike, thanks for your help.
On 2015-05-22 02:32 Mike Bayer <[email protected]> wrote: > if you copy an object to transient, now instance_state.key is gone, > next step is erase the primary key column-holding attributes, such as > myobject.id = None. object on flush will have no PK value and > autoincrement will be used instead. This works for the case. But I wonder... When I create a really new object, add() it to the session, I don't have to call flush() on the session before commit() it. The add-and-commit-part of my application doesn't know where the object comes from. It doesn't know if it is real new or if it is a "duplicate" created with make_transient() and Primary_Key=None. See what I mean? -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/d/optout.
