Unable to query key attribute that uses AttributeConverter
Description
Attachments
4
is followed up by
relates to
Activity
Show:
Marco Belladelli August 2, 2023 at 11:57 AM
Closing this in favor of .

Timon Zilles July 25, 2023 at 7:38 AMEdited
[deleted comment]

Timon Zilles July 18, 2023 at 7:46 AMEdited
Is there any chance, that the linked issue () will be solved in the near future? As also mentioned by Julien Ravet, it doesn’t work also for non-id fields (using user types).
I can see that for this issue the status is on “Awaiting Community”, but the referenced issue has the status “Open”, even though it has way more votes.

Piotr Przybylski June 5, 2023 at 4:46 PM
I created a better-described issue: , with test case for UserType. Maybe let’s close this one.
Julien Ravet May 30, 2023 at 1:43 PMEdited
Here is an example using @JavaType
annotation
Encountering the same issue on both id and non id fields
@MarcoBelladelli I understand that this is not exactly the same issue (same error, but using type instead of converter) Do you want me to open a distinct issue ?
Same as , but for entity keys, so I will be reusing most of that issue’s contents (I didn’t test inserts, but I suppose they may be also broken).
The model has
java.time.YearMonth
attributes being mapped to integers on the DB (MariaDB):Converter class:
Or use
YearMonthDateType
from Hypersistence Utils - the result is the same, i.e. building a query likeresults in an exception: