首页 > 解决方案 > 在 IgniteRepository 中使用连接查询时无法从类型 [java.util.ArrayList ] 转换错误

问题描述

在 IgniteRepository 中使用连接查询时出现异常。

@Query(" select pers.* from Person as pers, ORG_CACHE.Organization as org where pers.orgId = org.id and lower(org.name) = lower(?)")
List<Person> selectPersonByOrganization(String organizationName);

例外:

{
  "timestamp": "2020-07-09T05:02:16.141+0000",
  "message": "Failed to convert from type [java.util.ArrayList<?>] to type [@org.apache.ignite.springdata22.repository.config.Query java.util.List<com.cache.entity.Person>] for value '[1, 2, 3, 6, 7, 8]'; nested exception is org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type [java.lang.Long] to type [@org.apache.ignite.springdata22.repository.config.Query com.cache.entity.Person]",
  "details": "uri=/person/organization/ApacheIgnite"
}

还想知道连接是分布式的还是托管的。

Apache Ignite:2.8.1 备用数据:ignite-spring-data_2.2

标签: javaspring-data-jpaignite

解决方案


推荐阅读