as far as basic transactional sanity, its reasonable; we imitate the constructs used by Hibernate. in a concurrent environment, its not possible to insure that objects in memory are always exactly in sync with the database, without going back to the database to refetch the data, or by pessimistically locking everything (which is not recommended). however, the Session/Query objects now support all the same methods that hibernate uses to insure consistency, which include optimistic concurrency control via checking the affected rowcount of operations using an optional versioning column, and pessimistic concurrency control via the "lockmode" keyword parameter recently added to the Query object (which corresponds to the usage of SELECT..FOR UPDATE and related constructs...this newer feature still needs documentation; however for most needs, optimistic concurrency control is effective).
If you always use your Session objects within a SessionTransaction, then youll have ACID behavior as good as that which you get from working with the database directly. note that SQLAlchemy is not a "framework" and does not "insure" any particular programming pattern, and is also a bit more open ended than Hibernate. so while its easier than not to write sane code using SQLAlchemy, its not a substitute for knowing the basics of how transactions work. On Sep 18, 2006, at 2:09 PM, Wolfgang Keller wrote: > Hello, > > as a lazy Python scripting dilettant who's looking for a persistence > framework for database applications, I was wondering whether > SQLAlchemy does > transparently ensure that all transactions will always be as ACID > as the > underlying database (PostgreSQL in my case) allows. Among others, > whether it > reliably ensures that e.g. the objects in memory and the records in > the > database are always consistent themselves and in sync with each other, > especially with multiple concurrent clients in a client-server > application. > > Just because I don't want to have to take care of all this > "transaction > management" myself, as this is complete rocket-science to me... > > TIA, > > Sincerely, > > Wolfgang Keller > > -- > My email-address is correct. > Do NOT remove ".nospam" to reply. > > > ---------------------------------------------------------------------- > --- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to > share your > opinions on IT & business topics through brief surveys -- and earn > cash > http://www.techsay.com/default.php? > page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Sqlalchemy-users mailing list > Sqlalchemy-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Sqlalchemy-users mailing list Sqlalchemy-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users