Re: [sqlalchemy] explicitly add objects to identity map

2016-07-21 Thread Mehdi gmira
Once some object is garbage collected by python, it disappears from the identity map. Example: Set up your db: from sqlalchemy.orm import sessionmaker from sqlalchemy import create_engine from sqlalchemy import Column, String, Integer from sqlalchemy.ext.declarative import declarative_base

Re: [sqlalchemy] explicitly add objects to identity map

2016-07-21 Thread Simon King
On Thu, Jul 21, 2016 at 3:29 PM, Mehdi gmira wrote: > Is there a way to explicitely add objects to the identity map ? I would like > to be able to do something like: > > foos = session.query(Foo).all() > add_to_identity_map(foos) I don't understand the question - objects

[sqlalchemy] explicitly add objects to identity map

2016-07-21 Thread Mehdi gmira
Is there a way to explicitely add objects to the identity map ? I would like to be able to do something like: foos = session.query(Foo).all() add_to_identity_map(foos) -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this