How to write join query using @query in spring data jpa without mapping (@oneToOne or manyToOne) between two entities class?
2 Answers
Unfortunately this is not supported by JPA. Therefore Spring Data JPA can not join unrelated entities.
Hibernate 5.1 introduced explicit joins. You can leverage this feature by adding a custom repository implementation.