I have two tables one is customer the other is orders,
onetomany: customer -> orders
manytoone: orders -> customer
I have seen an internal table created, which is customer_orders.
Does hibernate create it?
How to enable/disable this feature?
As explained in the Hibernate User Guide, the following associations match the one-to-many database table relationship:
bidirectional @OneToMany
unidirectional @ManyToOne and
the unidirectional @OneToMany association + @JoinTable
The unidirectional @OneToMany association without @JoinTable looks more like a many-to-many relationship + a Unique Constraint. Only this association uses a separate table.