Skip to content
Advertisement

Tag: declarative

SQLAlchemy: a better way for update with declarative?

Let’s say I have a user table in declarative mode: When I know user’s id without object loaded into session, I update such user like this: I dislike using User.__table__, should I stop worrying with that? Is there a better way to do this? Answer There’s also some update capability at the ORM level. It doesn’t handle any tricky cases

Advertisement