Created
May 22, 2018 16:29
-
-
Save evonsdesigns/3a1c20cf4d0b931412b8a555e120f796 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Repository | |
| public interface PersonRepository extends CrudRepository<Person, Long> { | |
| @Query( value = "select * from person p " + | |
| "join person_addresses b " + | |
| " on p.id = b.person_id " + | |
| "join address c " + | |
| " on c.id = b.addresses_id " + | |
| "where c.zip = :zip", nativeQuery = true) | |
| Iterable<Person> getPeopleWithZip(@Param("zip") String zip); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment