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
Looking through the InMemory and Postgres test classes I noted that the two implementations how differently how to they handle a criterion with an unexisting field as left operand, specifically:
the in memory implementation make the criterion always return false (see BaseCriterionToPredicateConverter at line 58) making the query method return an empty List
the sql implementation throws an IllegalArgumentException.class (see TranslationMapping at line 48) .
My proposal would be to have them behave the same as they are implementing the same interface, not sure what's the best way, maybe throwing the exception will make the caller being aware of the bad request so I'd say that the current sql implementation is correct and the in-memory must be adapted.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Looking through the
InMemory
andPostgres
test classes I noted that the two implementations how differently how to they handle a criterion with an unexisting field as left operand, specifically:BaseCriterionToPredicateConverter
at line 58) making the query method return an emptyList
IllegalArgumentException.class
(seeTranslationMapping
at line 48) .My proposal would be to have them behave the same as they are implementing the same interface, not sure what's the best way, maybe throwing the exception will make the caller being aware of the bad request so I'd say that the current sql implementation is correct and the in-memory must be adapted.
thoughts?
Beta Was this translation helpful? Give feedback.
All reactions