title: Hibernate - why use many-to-one to represent a one-to-one?
body: <p>I've seen people use many-to-one mappings to represent one-to-one relationships. I've also read this in a book  by Gavin King and on articles.</p>
  
  <p>For example, if a customer can have exactly one shipping address, and a shipping address can belong to only one customer, the mapping is given as:</p>
  
  <pre><code>&lt;class name="Customer" table="CUSTOMERS"&gt;
      ...
      &lt;many-to-one name="shippingAddress"
                   class="Address"
                   column="SHIPPING_ADDRESS_ID"
                   cascade="save-update"
                   unique="true"/&gt;
      ...
  &lt;/class&gt;
  </code></pre>
  
  <p>The book reasons as (quoting it): </p>
  
  <blockquote>
    <p>"You don't care what's on the target side of the association, so you can treat it like a <em>to-one</em> association without the <em>many</em> part."</p>
  </blockquote>
  
  <p>My question is, why use <code>many-to-one</code> and not <code>one-to-one</code>? What is it about a <code>one-to-one</code> that makes it a less desirable option to <code>many-to-one</code>?</p>
  
  <p>Thanks.</p>