0

We can do 'findByXXsIn' in spring data JPA, but it seems that I failed to do this in spring data Redis, is there an alternative to do this?

I tagged an object, and store the relation in 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); 
}

It's many to many relationship, I want to get the relations by tagIds but just failed.

Paolo Forgia
  • 6,572
  • 8
  • 46
  • 58
user2926474
  • 1
  • 1
  • 2

1 Answers1

2

Currently only simple finder methods with the keywords Is or Equals as well as combinations of those using And / Or are supported. Please refer to Table 5. Supported keywords in the reference manual for Queries and Query Methods.

Christoph Strobl
  • 6,491
  • 25
  • 33