title: Hibernate one-to-one (on foreign key) vs one-to-one (on primary key)
body: <p>I have questions about<br>
  What are the benefits of using a <code>one-to-one</code> association on <strong>foreign key</strong> or a <code>one-to-one</code> association on the <strong>primary key</strong>?  </p>
  
  <p>I've read the documentation of Hibernate available at: <a href="http://docs.jboss.org/hibernate/orm/3.3/reference/en/html/associations.html#assoc-unidirectional-121" rel="nofollow noreferrer">http://docs.jboss.org/hibernate/orm/3.3/reference/en/html/associations.html#assoc-unidirectional-121</a>  </p>
  
  <p>Can someone tell me with details the plus of using the first or the second implementation?</p>
  
  <p>Another question, I have a <code>one-to-one</code> unidirectional relationship between User and Perimeter.<br>
  (User ----> Perimeter) and I want to use the association based on the foreign key.<br>
  Could I reverse the direction into (User &lt;---- Perimeter) so the table User stay intact?<br>
  I think that is not reasonable (perimeter.getUser() !!!) but it's technically possible?</p>