Hi,

I've created a repo with a method that requires an "IN" clause and I pass it an ArrayList.

Code:
public List<Vw_personLocation> findByPersonIdAndOrganizationIdAndRoleCodeIn(Long personId, Integer organizationId, List<String> roleCodes);
When this runs, it creates the following SQL Statement:

Code:
Query: ReadAllQuery(referenceClass=Vw_personLocation sql="SELECT ROLELISTID, ADTDOCTORID, LOCATIONCODE, LOCATIONID, LOCATIONNAME, MRNGROUPID, ORGANIZATIONID, PERSONID, ROLECODE, ENTITY_UID, VERSION FROM VW_PERSONLOCATION WHERE (((PERSONID = ?) AND (ORGANIZATIONID = ?)) AND (ROLECODE IN (?)))")
I get the following exception:

Code:
Caused by: java.sql.SQLException: Operand should contain 1 column(s)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1073)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4096)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4028)
	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2490)
	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2651)
	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2683)
	at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2144)
	at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2310)
	at com.jolbox.bonecp.PreparedStatementHandle.executeQuery(PreparedStatementHandle.java:172)
	at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeSelect(DatabaseAccessor.java:938)
	at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:609)
	... 73 more
If I run this in MySQL, it also fails with the same exception. It appears as though it has an issue with all of the parenthesis.

Any solution to this?

Thanks,
Tom