core-java
core-java copied to clipboard
Do not allow querying of non-`Comparable` entity columns
Entity columns can be persisted in the storage as any Java type including non-Comparable
ones.
When querying for column value, some implementations (for example, jdbc one) may require that column type is Comparable
, and querying for non-Comparable
columns makes little sense in general.
At the moment, the check that the column type is Comparable
is performed during the query itself, failing it if the check does not pass.
We should handle the situation earlier, not allowing to query non-Comparable
entity columns in the first place.