
The first one "belongsTo = [customer: Customer" defines a one-to-one relationship between CustomerOrders and Customers. It stores the reference in the "CUSTOMER_ORDER" table in a "CUSTOMER_ID" column:

The second and third types of belongsTo relationships produce the same type of schema, with neither the "CUSTOMER" or "CUSTOMER_ORDER" tables containing references to each other, but rather that relationship information being kept in a "CUSTOMER_CUSTOMER_ORDER" table.

No comments:
Post a Comment