Point to note here is the Many-to-one tag. We are associating the entities with one-to-one but we are using a many-to-one tag. When using many-to-one in one-to-one mapping, we ignore the ‘many’ part. We are not caring how many address are bound to a customer, but here we ensure that only one customer (to-one part) is bound to an address.
Can you please let me know more on the rationale not to use a one-to-one mapping over your preffered many-to-one ?
What is the inconvenience in that case of using a one-to-one mapping ?
posted 7 years ago
but in some toutrial it is also used one-to-one tag: