i solved it with : /////////////////////////// session.query(Sellers).filter(or_(sellers.c.name == 'golrang')).delete('sellers') ///////////////////////////////////
On Monday, September 2, 2013 2:00:49 AM UTC+4:30, Mohsen Pahlevanzadeh wrote: > > Dear all, > > i get the following traceback for "session.query().filter(sellers.c.name== > 'golrang').delete('sellers')" line: > > /////////////////////////////////// > Traceback (most recent call last): > File "/home/mohsen/codes/amlak/amlak/src/test.py", line 106, in <module> > session.query().filter(sellers.c.name == 'golrang').delete('sellers') > File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line > 2580, in delete > self, synchronize_session) > File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", > line 935, in factory > }, synchronize_session, query) > File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", > line 809, in _factory > for x in lookup.keys())))) > sqlalchemy.exc.ArgumentError: Valid strategies for session synchronization > are 'evaluate', 'fetch', False > //////////////////////////////////// > > Where's problem? > > -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email to sqlalchemy@googlegroups.com. Visit this group at http://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/groups/opt_out.