You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure if it does this or not, but Query should run values through the isetter method also before it runs the query, that way if you have a mapping from String to int in the isetter methods, say something like:
mapping= {
"foo": 1,
}
Then doing something like:
MyOrm.query.is_name("foo")
the "foo" value would be converted to 1 before running the query.
The text was updated successfully, but these errors were encountered:
I think I can add a classmethodField.iwhere that can be called anytime a field is set in the query. What I don't like about this is it might couple Query and Orm too tightly again and I just got finished uncoupling them
This was solved with the Field.iquery(query, v) method that gets run everytime a field is set in a query. The reason why this had to be a different method than Field.iset is because the iset method takes an orm instance and the Query instance often doesn't have an orm instance to pass to the iset method.
I'm not sure if it does this or not, but Query should run values through the isetter method also before it runs the query, that way if you have a mapping from String to int in the isetter methods, say something like:
Then doing something like:
the "foo" value would be converted to 1 before running the query.
The text was updated successfully, but these errors were encountered: