title: mapping a composite key with hibernate
body: <p>I'm trying to map one to many relationship using Hibernate :</p>
  
  <p>I have a profil with multiple properties:  </p>
  
  <p><strong>Profil.java</strong></p>
  
  <pre><code> public class Profil {
  
   private String idProfil;
  
   private String name; 
  
  
   private Set&lt;Properties&gt; setProperties;
  
   }
  </code></pre>
  
  <p><strong>Properties.java</strong> </p>
  
  <pre><code>  public class Properties {
  
   private CompositeId id;
  
   private String  length;
  
   private String  heigth;
  
   private String  width;
  
  }
  </code></pre>
  
  <p>and a <strong>compositeId.java</strong></p>
  
  <pre><code>public class CompositeId {
  
  private String idPropertiy; 
  
  private String idProfil;//idProfil is a foreign key 
  }
  </code></pre>
  
  <p>idProperty is assigned manually.</p>
  
  <p>idProfil is assigned automatically.</p>
  
  <p>can anyone help  me to write the hbm.xml files.</p>