I want to specify join type on two hibernate entities
`
@Entity
@Table(name = "b_template_control")
public class TemplateControl {
@Column(name = "id")
private Long id;
@JsonInclude(JsonInclude.Include.NON_EMPTY)
@ManyToOne(fetch = FetchType.EAGER, cascade = CascadeType.DETACH)
@JoinColumn(name = "back_validation_id", nullable = false, insertable
= false, updatable = false)
private ValidationRuleBack validationRuleBack;
}
`
as you can see we have @ManyToOne relation, by default hibernate creates INNER JOIN query but I need LEFT JOIN. The question is how could I specify join type using annotations.
Answer It is nullable = false, so how would a left join be different from an inner join?
nullable = false, so how would a left join be different from an inner join?