On Mon, 2013-11-18 at 10:23 -0500, Michael Bayer wrote: > we support this though I’m not finding a doc so easily,
Yep.
> I believe you’d just index the key: update({User.prefs[‘transitAvaiable’]:
> True})
That fails; with the same message, regardless of if I specify
synchronize_session('fetch') or not.
session.query(User).\
filter(User.prefs.has_key('inboundBusStop')).\
update({User.prefs['transitAvaiable']: True, }).\
synchronize_session('fetch')
Traceback (most recent call last):
File "use-hstore.py", line 47, in <module>
update({User.prefs['otherkey']: 'fred', }).\
File
"/home/awilliam/projects/whitemice/lib/python2.7/site-packages/sqlalchemy/orm/query.py",
line 2690, in update
update_op.exec_()
File
"/home/awilliam/projects/whitemice/lib/python2.7/site-packages/sqlalchemy/orm/persistence.py",
line 815, in exec_
self._do_pre_synchronize()
File
"/home/awilliam/projects/whitemice/lib/python2.7/site-packages/sqlalchemy/orm/persistence.py",
line 866, in _do_pre_synchronize
"Could not evaluate current criteria in Python. "
sqlalchemy.exc.InvalidRequestError: Could not evaluate current criteria
in Python. Specify 'fetch' or False for the synchronize_session
parameter.
--
Adam Tauno Williams <mailto:[email protected]> GPG D95ED383
Systems Administrator, Python Developer, LPI / NCLA
signature.asc
Description: This is a digitally signed message part
