124 words

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

BugVersion: Priority: NormalStatus: FixedReplies: 1
2015-04-07 12:01

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


Queries using JPQL IN expressions on this field won't work correctly anymore. This issue has been described in forum post 681 (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!

opetri's picture
Joined on 2015-04-07
User Post #2
2015-04-13 13:25

Thank you for this report. The bug can be easily repeated by changing the example in forum post #681 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
ObjectDB - Fast Object Database for Java (JPA/JDO)
support's picture
Joined on 2010-05-03
User Post #2,186

Post Reply

Please read carefully the posting instructions - before posting to the ObjectDB website.

  • You may have to disable pop up blocking in order to use the toolbar (e.g. in Chrome).
  • Use ctrl + right click to open the browser context menu in the editing area (e.g. for using a browser spell checker).
  • To insert formatted lines (e.g. Java code, stack trace) - select a style in the toolbar and then insert the text in the new created block.
  • Avoid overflow of published source code examples by breaking long lines.
  • You may mark in paragraph code words (e.g. class names) with the code style (can be applied by ctrl + D).
  • Long stack traces (> 50 lines) and complex source examples (> 100 lines) should be posted as attachments.
Maximum file size: 32 MB