A simple JPA / JPQL question. I have an entity with ManyToMany relation:
@Entity
public class Employee {
@ManyToMany
@JoinTablename="employee_project"
joinColumns={@JoinColumn(name="employee_id"}
inverseJoinColumns={@JoinColumn(name="project_id"})
private List<Project> projects;
What is a JPQL query to return all employees who have no projects?
source
share