hbm2java doesn't seem to recurse. As noted in the hibernate documentation, nesting components is not unusual. I can sucessfully use a nested component. My problem arises when I try to use hbm2java. If I use hbm2java on an hbm similar to the one below, it will generate Level1Comp.java, but not Level2Comp.java. If I then pull the Level2Comp component out of the Level1Comp component in the hbm then it will generate both. At this point I can revert to the hbm format I want and I have my java files too. Has anyone else come across this problem? Is there a cleaner way to deal with it?
Hibernate version:  2.1.6
Hibernate tools jar:  hibernate-tools-2.1.2.jar
Mapping documents:
Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping
    PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN"
    "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping>
<class 
    name="happyClass" 
    table="HAPPY_CLASS"
>
  <composite-id name="comp_id" class="HappyPK" unsaved-value="none">
    <meta attribute="default-value" inherit="true">new HappyPK()</meta> 
    <key-property name="key1" column="KEY1" type="java.lang.String" length="16">
      <meta attribute="default-value" inherit="true">null</meta> 
    </key-property>
    <key-property name="key2" column="KEY2" type="java.lang.String" length="16">
      <meta attribute="default-value" inherit="true">null</meta> 
    </key-property>
  </composite-id>
  <component name="level1Comp" class="Level1Comp" update="true" insert="true">
    <property name="level1Property" type="java.sql.String" column="LEVEL1PROPERTY" update="true" insert="true" /> 
    <component name="level2Comp" class="Level2Comp update="true" insert="true">
      <property name="level2Property" type="java.sql.String" column="LEVEL2PROPERTY" update="true" insert="true"/>
    </component>
  </component>
</class>
</hibernate-mapping>
[/code]