HBM文件:org.hibernate.MappingException:无法确定类型

时间:2015-01-29 08:57:32

标签: java hibernate hbm2ddl

从hibernate映射文件生成DDL脚本时出现以下错误:

org.hibernate.MappingException: Could not determine type for: cen._13606.rm.CS, at table: DATAVALUE, for columns: [org.hibernate.mapping.Column(NULLFLAVOR)].

这是DATAVALUE的hbm文件:

<hibernate-mapping>
    <class name="cen._13606.rm.DATAVALUE" table="DATAVALUE" abstract="true">
        <id name="nullFlavor" type="cen._13606.rm.CS">
            <column name="NULLFLAVOR" />
            <generator class="assigned" />
        </id>
        <discriminator type="string">
            <column name="DISCR_COL" />
        </discriminator>
    </class>
</hibernate-mapping>

这是CS的一部分:

<hibernate-mapping>
    <subclass name="cen._13606.rm.CS" extends="cen._13606.rm.DATAVALUE" discriminator-value="CS" lazy="false">
        <many-to-one name="codingScheme" class="cen._13606.rm.OID" fetch="join">
            <column name="CODINGSCHEME" />
        </many-to-one>
        <property name="codingSchemeName" type="java.lang.String">
            <column name="CODINGSCHEMENAME" />
        </property>
        <property name="codingSchemeVersion" type="java.lang.String">
            <column name="CODINGSCHEMEVERSION" />
        </property>
        <property name="codeValue" type="java.lang.String">
            <column name="CODEVALUE" />
        </property>
    </subclass>
</hibernate-mapping>

这些文件是从Java类自动创建的。谁能告诉我发生了什么?

0 个答案:

没有答案