Hacker News .hnnew | past | comments | ask | show | jobs | submitlogin

There are two approaches.

ActiveRecord approach. Objects aren't kept in cache calling update like that won't update other object in memory. Each time you call select you get a different object.

Hibernate approach. Object are kept in cache and running update will update existing objects in memory because each select returns the same object.

SqlAlchemy does permit both.



The only one I gave experience with is SqlAlchemy (1.x). You certainly can do a query builder update and get current subsequent data out of ORM objects, but it’s really easy to mess up, at least in my experience.


I meant if you use SqlAlchemy Core you get out mostly ActiveRecord behavior. If you use SqlAlchemy ORM you get latter behavior.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: