If you have this entity:
@Entity
public class A {
@ManyToOne
@JoinColumn(name = "bField", nullable = true)
private B myBObject;
}
And I have a generic generator of Criteria who will do that:
Root<A> root = criteria.from(A.class);
root.get("myBObject").get("aFieldInB");
The problem is the following: the generated sql will contains a CROSS JOIN between A and B. But I would like that the generated sql will contains a LEFT JOIN between A and B.
How can I do that?