title: Hibernate Tool - hibernate-mapping
body: <p>I am using Hibernate tool with eclipse ganymede 3.4.1. Now when I create the .hbm.xml file using the code generation of Hibernate tool, it is automatically creating a composite key.</p>
  <p>I am adding the code over here:</p>
  <pre><code>&lt;hibernate-mapping&gt;
      &lt;class name=&quot;Employee&quot; table=&quot;Employee&quot; catalog=&quot;mytest&quot;&gt;
          &lt;composite-id name=&quot;id&quot; class=&quot;EmployeeId&quot;&gt;
              &lt;key-property name=&quot;id&quot; type=&quot;java.lang.Integer&quot;&gt;
                  &lt;column name=&quot;id&quot; /&gt;
              &lt;/key-property&gt;
              &lt;key-property name=&quot;name&quot; type=&quot;string&quot;&gt;
                  &lt;column name=&quot;name&quot; length=&quot;30&quot; /&gt;
              &lt;/key-property&gt;
          &lt;/composite-id&gt;
      &lt;/class&gt;
  &lt;/hibernate-mapping&gt;
  </code></pre>
  <p>but I need a mapping something like:</p>
  <pre><code>&lt;hibernate-mapping&gt;
      &lt;class name=&quot;Employee&quot; table=&quot;Employee&quot; catalog=&quot;mytest&quot;&gt;
         
              &lt;id name=&quot;id&quot; type=&quot;java.lang.Integer&quot;&gt;
                  &lt;column name=&quot;id&quot; /&gt;
              &lt;/id&gt;
              &lt;key-property name=&quot;name&quot; type=&quot;string&quot;&gt;
                  &lt;column name=&quot;name&quot; length=&quot;30&quot; /&gt;
              &lt;/key-property&gt;
              &lt;/class&gt;
  &lt;/hibernate-mapping&gt;
  </code></pre>
  <p>Can someone tell me how to do it?</p>