On 17 Cze, 16:20, Michael Bayer <mike...@zzzcomputing.com> wrote: > I usually just turn expire_on_commit = False. But note also if you just > want to do a get(), the actual PK is always present in the "key", which is > instance_state(myinstance).key[1].
I do want rest of the attributes to expire, which makes expire_on_commit = False not practical. But i need (read-only) access to primary key attribute in another thread, and a guarantee that this access won't result in any database queries. Can you perhaps suggest another solution? Maciej Szumocki -- 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 sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.