sqlalchemy, postgresql and relationship stuck in "idle in transaction"
I have a problem related to sqlalchemy and postgresql.
class Profile(Base):
...
roles = relationship('Role', secondary=role_profiles,
backref='profiles', lazy='dynamic')
When running (current_user is an instance of the Profile class):
roles = current_user.roles.filter().all()
using sqlalchemy I get "idle in transaction" for all the selects for
reading the profile in postgresql.
From echoing the query I see that every select starts with:
BEGIN (implicit)
How do I manage this and how would I go about getting rid of the BEGIN for
selects?
No comments:
Post a Comment