2017-06-20 46 views
0

我们可以在spring数据JPA中做'findByXXsIn',但似乎我没有在Spring数据Redis中做到这一点,是否有替代方案呢?Spring数据redis存储库不支持集合查询?

我标记了一个对象,并将关系存储在Redis(tagId,targetId,targetType)中。

public interface TagRelationRepository { 
    Page<TagRelation> findTagRelationByTagIdIn(List<String> tagIds,Pageable page); 
    Page<TagRelation> findTagRelationByTargetType(TagTargetType targetType,Pageable page); 
    List<TagRelation> findByTargetIdInAndTargetType(List<Long> targetIds,TagTargetType targetType); 
} 

这是多对多的关系,我想通过tagIds获取关系,但只是失败。

回答

0

目前只适用于关键字IsEquals简单的查找方法以及使用And/Or这些的组合支持。 请参阅表5.支持的关键字reference manual查询和查询方法