ObjectDB ObjectDB

Issue #1639: @Enumerated(EnumType.STRING) annotation inhibits proper execution of IN expressions.

Type: Bug ReoprtPriority: NormalStatus: FixedReplies: 1
#1

When the following annotation is present on an enum type entity field:

@Enumerated(EnumType.STRING)

Queries using JPQL IN expressions on this field won't work correctly anymore. This issue has been described in forum post 1254 (JPA JPQL WHERE clause for IN :variable not working if variable is a list of Enums).

See also the attached test case (play with adding and removing the Enumerated annotation).

Best regards, and thank you for this great piece of work!

edit
delete
#2

Thank you for this report. The bug can be easily repeated by changing the example in forum post #1254 to @Enumerated(EnumType.STRING), as your suggestion.

It happened because ObjectDB considered a collection of emum values as a query parameter argument to be always @Enumerated(EnumType.ORDINAL). This is fixed now in build 2.6.1_05.

 

ObjectDB Support
edit
delete

Reply

To post on this website please sign in.