If I have something like this
@Entity
public class Facility {
...
@ManyToOne
@JoinColumn(name="CUSTOMER_FK")
private Customer customer;
...
}
does my @NameQuery
like this
@NamedQuery(name="Facility.findByCustomerId", query="select c from Facility c where c.customer=:customer_fk")
or like this
@NamedQuery(name="Facility.findByCustomerId", query="select c from Facility c where c.CUSTOMER_FK=:customer_fk")