Skip to content
Snippets Groups Projects
Commit 840c0a41 authored by Mic's avatar Mic
Browse files

fixing JPA query for Vets

parent 5bf31dbe
No related branches found
No related tags found
No related merge requests found
......@@ -45,7 +45,7 @@ public class JpaVetRepositoryImpl implements VetRepository {
@Cacheable(value = "vets")
@SuppressWarnings("unchecked")
public Collection<Vet> findAll() {
return this.em.createQuery("SELECT vet FROM Vet vet join fetch vet.specialties ORDER BY vet.lastName, vet.firstName").getResultList();
return this.em.createQuery("SELECT distinct vet FROM Vet vet left join fetch vet.specialties ORDER BY vet.lastName, vet.firstName").getResultList();
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment