Mam taki kawalek kodu Hibernate:

<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
    "-//Hibernate/Hibernate Mapping DTD//EN"
    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >

<hibernate-mapping package="sdc.db.pojo" default-access="field" >
    <class name="NodeHier" table="L_NODE_HIER">
        <meta attribute="sync-DAO">false</meta>
        <meta attribute="class-description">Relation between nodes - (locality - building), ...</meta>

        <composite-id name="id" class="NodeHierPk">

            <key-many-to-one name="parent" column="NODE_ID_PARENT" class="Node" lazy="false"/>
            <key-many-to-one name="child" column="NODE_ID_CHILD" class="Node" lazy="false"/>

        </composite-id>
    </class>
</hibernate-mapping>

Z jakis niejasnych dla mnie powodow EJB3 nie jest w stanie przegryzc sie przez key-many-to-one ( przynajmniej tak mi sie wydaje) i rzuca taki bledem.

org.hibernate.tool.hbm2x.ExporterException: Error while processing Component: sdc.db.pojo.NodeHierPk with template pojo/Pojo.ftl
Error while processing Component: sdc.db.pojo.NodeHierPk with template pojo/Pojo.ftl
  freemarker.core.InvalidReferenceException: Expression pojo.generateManyToOneAnnotation is undefined on line 13, column 3 in pojo/Ejb3PropertyGetAnnotation.ftl.
  Expression pojo.generateManyToOneAnnotation is undefined on line 13, column 3 in pojo/Ejb3PropertyGetAnnotation.ftl.
    freemarker.core.InvalidReferenceException: Expression pojo.generateManyToOneAnnotation is undefined on line 13, column 3 in pojo/Ejb3PropertyGetAnnotation.ftl.
    Expression pojo.generateManyToOneAnnotation is undefined on line 13, column 3 in pojo/Ejb3PropertyGetAnnotation.ftl.

create statement dla L_NODE_HIER:


CREATE TABLE `L_NODE_HIER` (
  `NODE_ID_PARENT` bigint(20) NOT NULL,
  `NODE_ID_CHILD` bigint(20) NOT NULL,
  PRIMARY KEY (`NODE_ID_PARENT`,`NODE_ID_CHILD`),
  KEY `FK9EBF6558C1CD2369` (`NODE_ID_PARENT`),
  KEY `FK9EBF655867C18BAD` (`NODE_ID_CHILD`),
  CONSTRAINT `FK9EBF655867C18BAD` FOREIGN KEY (`NODE_ID_CHILD`) REFERENCES `L_NODE` (`NODE_ID`),
  CONSTRAINT `FK9EBF6558C1CD2369` FOREIGN KEY (`NODE_ID_PARENT`) REFERENCES `L_NODE` (`NODE_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 
+----------------+------------+------+-----+---------+-------+
| Field          | Type       | Null | Key | Default | Extra |
+----------------+------------+------+-----+---------+-------+
| NODE_ID_PARENT | bigint(20) | NO   | PRI | NULL    |       |
| NODE_ID_CHILD  | bigint(20) | NO   | PRI | NULL    |       |
+----------------+------------+------+-----+---------+-------+

Czy ktos wie moze czym to jest spowodowane?


!user image
I am he who watches they. I am the fist of retribution. That which does quell the recalcitrant. Dare you defy the Warchief? Dare you face my merciless judgement?