katharsis-framework icon indicating copy to clipboard operation
katharsis-framework copied to clipboard

Is there a way to make a join query?

Open exports opened this issue 7 years ago • 2 comments

For example, I have a many-to-many relationship, and I want to get users that have specific tag id, I tried with ?filter[tags][id]=id but it's not working.

class User {
  @ManyToMany
  private Set<Tag> tags;
}

class Tag {
  @ManyToMany
  private Set<User> users;
}

exports avatar Mar 26 '17 06:03 exports

Need some more information.

Are you using katharsis-jpa or vanilla katharsis?

If you are not using katharsis-jpa, then you have to provide the filtering yourself in the implementation of your Repository or RelationshipRepository.

If you are using katharsis-jpa, then @remmeier can add something about how that is supposed to work.

Ramblurr avatar Mar 27 '17 07:03 Ramblurr

I'm using katharsis-jpa :)

exports avatar Mar 28 '17 04:03 exports