Created
May 29, 2018 16:04
-
-
Save nosrednawall/4d08dcab5c9d8f865013fa01abe0680d to your computer and use it in GitHub Desktop.
Exemplo de namedquery
This file contains 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
@NamedQueries({ | |
@NamedQuery(name = "Lojista.listarTodos", query = "" + "SELECT DISTINCT l FROM Lojista l " | |
+ "LEFT JOIN FETCH l.endereco " + "LEFT JOIN FETCH l.loja " + "WHERE l.status = :pStatus"), | |
@NamedQuery(name = "Lojista.find", query = "" + "SELECT DISTINCT l FROM Lojista l " | |
+ "LEFT JOIN FETCH l.endereco " + "LEFT JOIN FETCH l.loja " + "WHERE l.id = :pId") }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment