java Spring数据redis存储库不支持集合查询?
我们可以在SpringDataJPA中执行'findByXXsIn',但似乎我在SpringDataRedis中没有做到这一点,有其他方法可以执行吗
我标记了一个对象,并将关系存储在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);
}
这是一个多对多关系,我想通过tagid获取关系,但失败了
# 1 楼答案
目前只支持关键字为
Is
或Equals
的简单查找器方法以及使用And
/Or
的那些方法的组合。 请参阅表5。查询和查询方法的reference manual中支持的关键字