I have a task when I have to hide some rows from tables by record existence / not existence record row from filter table.
What I mean. For example I have a few tables:
company, contact, address, filter
And I have to select from company table data that match some condition from filter table. I guess to use something like
filter_table_name (or Entity class name) filter_field_name (or Entity field name) filter_field_type (or Java type) filter_field_value (for sorting)
and somehow add to join or sub select in main query, but I don't know how.
What is the best way to do this? I'm using Spring Data JPA.