I have a PickleType type field in the table, into which I load my class with the __eq__() method of restarting comparison, how can I make filter(Table.column == obj) in sqlalchemy?

PS So

 session.query(Table).filter(Table.column == obj) 

does not work, alchemy seems to call the sql operator, not __eq__ .

    1 answer 1

    Well, in general with what I saw, it is not possible. If you want to use __eq__ then you need to do a normal filter (with loading an object into memory and a corresponding speed).