use sqlalchemy entity isolately
i just want to use an entity modify it to show something,but don't want to change to th开发者_运维问答e db,
but after i use it ,and in some other place do the session.commit()
it will add this entity to db,i don't want this happen, any one could help me?
You can expunge it from session before modifying object, then this changes won't be accounted on next commits unless you add the object back to session. Just call session.expunge(obj)
.
精彩评论