title: Hibernate one-to-one mapping with a reference column (XML mapping)
body: <p>I have a user table and a <code>user_detail</code> table with one to one mapping <code>user_detail</code> table have a field <code>user_id</code> to be used for this relation which stores id field value of corresponding user.</p>
  
  <p>How to write the hibernate <code>hbm</code> file for this relation?</p>
  
  <p>UPDATE</p>
  
  <p>what my problem is that user's primary key is <code>id</code> , user_detail's foreign key is <code>user_id</code></p>
  
  <p>all the examples i got in internet users user_id as users primary key and the same as foreign key in other table </p>