[Sqlalchemy-tickets] Issue #3100: session.flush_object() ? (zzzeek/sqlalchemy)
Brought to you by:
zzzeek
|
From: Mike B. <iss...@bi...> - 2014-06-26 18:48:57
|
New issue 3100: session.flush_object() ? https://bitbucket.org/zzzeek/sqlalchemy/issue/3100/sessionflush_object Mike Bayer: the common use case where folks need to INSERT or UPDATE a single row, fast. session.flush_object(some_object) This would pull into the persistence.py mechanics to flush *just that one object*. No collections, no related items. it would skip all of flush(), unitofwork.py and go directly to save_obj, or if the object were marked deleted to delete_obj. Essentially its what a simple ORM would do with an obj.save() method. for starters, it would *not* do any foreign key syncs from a related m2o, that's a UOW function. im sure people will complain soon enough though. |