Open njr-11 opened 8 months ago
See EclipseLink Issue : 2196
This issue asks the question, "Is it expected that the JPQL IN operation should work with EmbeddedId?". It's fine that EclipseLink has answered that question with "No". However, given that it is not supported, EclipseLink needs to be raising a better error to the user saying that it isn't supported rather than trying to run some SQL command that fails in the database with a parse error. This makes it look to our users like it is broken rather than intentionally unsupported.
Is it expected that the JPQL
IN
operation should work with EmbeddedId? EcilpseLink appears to be trying to support it but generates the SQL in a way that results in an error.To reproduce, uncomment these lines in an existing test case and run it, https://github.com/OpenLiberty/open-liberty/blob/14b5803705fa443a0d44b8d54bcc52b2e51eacea/dev/io.openliberty.data.internal_fat_jpa/test-applications/DataJPATestApp/src/test/jakarta/data/jpa/web/DataJPATestServlet.java#L860-L862
The error raised is:
The JPQL used is:
SELECT o FROM Account o WHERE (o.accountId IN ?1 OR o.owner=?2) ORDER BY o.owner DESC