-
Notifications
You must be signed in to change notification settings - Fork 693
Spring Data Spanner Repositories In
clause queries support
#1701
Comments
EDIT: EDIT2: Looks like we can use the "IN UNEST()" expression and bind a single ARRAY type param. Note that the user can always just specify a query using the IN clause using |
By the way it looks like your example method name is actually a It is only if you part-tree/name-convention query method like "findByCol1AndCol2In" without |
@ChengyuanZhao Thanks for taking up on this issue, I have tried using method name such as findByCol1AndCol2In and then using some different name with |
@don-mayur I added support in the referenced PR. |
fixes #1701 array param binding in queries. and IN clause
Spring data spanner gives
java.lang.UnsupportedOperationException: The statement type: IN (1): [IsIn, In] is not supported.
when trying to useIN
for selecting columns part of a composite key in a SpannerRepository interface@Query("select * from <TableName> t where t.<columnName1>= @param1 AND t.columnName2 IN (@param2)")
Set<OnHandInventory> findBy<ColumnName1>And<ColumnName2>In(@Param("param1") String columnOneValue,@Param("param2") Set<Long> column2Values);
Note: Exception being thrown at SpannerStatementQueryExecutor.java
The text was updated successfully, but these errors were encountered: