I seem to get this after I call a transaction.commit
sqlalchemy.orm.exc.DetachedInstanceError
DetachedInstanceError: Instance <Useraccount at 0x103f9f610> is
not bound to a Session; attribute refresh operation cannot proceed
In the following code, the first call will print the id [ i called a
flush() previously ], however the second call will generate the error.
print userInstance.id
transaction.commit()
print userInstance.id
anyone have a clue what i can do ?
sqlalchemy is running under pyramid and transaction , and I'm using a
declarative base.
I will admit that i have some janky db sessioning stuff going on
behind the scenes as I get used to pyramid and the new sqlalchemy.
i've cobbled this together from some legacy code and current
https://github.com/jvanasco/pyramid_sqlassist , and its driving the
app in question.
i can't seem to understand why transaction would clear the session
data out though.
--
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.