I need to use ilike
in an update statement but it returns this error when I try:
InvalidRequestError: Could not evaluate current criteria in Python. Specify 'fetch' or False for the synchronize_session parameter.
for this code:
meta.Session.query(i.mappedClass).filter(getattr(i.mappedClass, j).ilike("%"+userid+"%")).update({j:newUserId})
I could use something like regexp_replace but it's a bit overkill. I just want the update to accommodate case insensitivity and spaces at either end.