title: hibernate foreign key mapping many-to-one
body: <p>I have been working on it for quite a while, but still can't figure out what's wrong with my code.
  Each Service has multiple profiles, but each profile only has one Service.</p>
  
  <pre><code>Service
  {
  Long service_id; // primary key
  ... getter/setter
  }
  
  Profile
  {
  Long profile_id; // primary key
  Long service_id; // foreign key
  ... getter and setter
  }
  </code></pre>
  
  <p>in Profile.hbm.xml. I add </p>
  
  <pre><code>&lt; many-to-one name="service_id" class="com.mot.diva.dto.Service" column="SERVICE_ID" cascade="save-update"&gt;
  &lt; /many-to-one&gt;
  </code></pre>
  
  <p>Is it the correct way to map it? </p>