I'm experiencing issues with the findBy<field>In(Collection<Long> itemIds) method using a JpaRepository.
Whenever I call the method with a collection of identifiers containing more than one entry, I get a "missing right perenthesis" SQL error. This is with EclipseLink going against an Oracle Express 11g database.
For example:
records = adminRecordRepo.findByItemIdIn(Arrays.asList(5598L ,14663L,49465L));
produces the error below (ORA-00907: missing right parenthesis).
However, if my key collection only contains one entry, the queries executes properly:
records = adminRecordRepo.findByItemIdIn(Arrays.asList(5598L ));
Anyone else experiencing similar issues? Suggestions (or is this a bug?)
Thanks
*K
Code:Internal Exception: java.sql.SQLSyntaxErrorException: ORA-00907: missing right parenthesis Error Code: 907 Call: SELECT ITEM_ID, ADMINISTRATIVESTATUS_TYPE, COMPONENT_ID, DATA_ID, DISSEMINATIONLEVEL_TYPE, INSERTTIME, REGISTRATIONLEVEL_TYPE, REGISTRATIONSTATUS_TYPE, UPDATETIME, "VERSION" FROM ADMIN_RECORD WHERE (ITEM_ID IN ((?,?,?))) bind => [5598, 14663, 49465] Query: ReadAllQuery(referenceClass=AdminRecord sql="SELECT ITEM_ID, ADMINISTRATIVESTATUS_TYPE, COMPONENT_ID, DATA_ID, DISSEMINATIONLEVEL_TYPE, INSERTTIME, REGISTRATIONLEVEL_TYPE, REGISTRATIONSTATUS_TYPE, UPDATETIME, "VERSION" FROM ADMIN_RECORD WHERE (ITEM_ID IN (?))")


Reply With Quote