Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for compareTo for AttributeConverter types #80

Open
mkp05 opened this issue Sep 25, 2019 · 1 comment
Open

Support for compareTo for AttributeConverter types #80

mkp05 opened this issue Sep 25, 2019 · 1 comment

Comments

@mkp05
Copy link

mkp05 commented Sep 25, 2019

It would be great to be able to have support also for compareTo method (translated to SQL probably to </> operators - they work for most types in DB engines) for datatypes using AttributeConverter and registered by registerAttributeConverterType. As I see in the docs (and from stacktrace :D) currently only equals is supported.

I think it can be assumed that simple comparison operators can be used and it would be great for using rich domain objects (written around single DB column) directly in entities and then in JINQ queries.

@my2iu
Copy link
Owner

my2iu commented Sep 25, 2019

Jinq relies on Hibernate/JPA for its queries, and it's a little unclear whether JPA actually handles comparison operators with AttributeConverters in an intelligent way or not (it might just compare the raw data in the SQL database, which can cause all sorts of unexpected behavior). So I'm hesitant about such a feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants