Beginner |
|
Joined: Thu Jul 14, 2005 10:11 am Posts: 32
|
Hello,
I'm trying to map the following XML. It seems that i can't use <generator class="identity"> in the super class. How can i solve this mess ???
Thanks!!!
(using microsoft sql server db)
----------------------------------------------------------------
The exception:
Caused by: org.hibernate.MappingException: Cannot use identity column key generation with <union-subclass> mapping for: clientes.Empresa
----------------------------------------------------------------
The mapping:
<class name="clientes.UsrCliente">
<id name="id">
<generator class="identity"/>
</id>
<property name="Activo" column="Activo" not-null="true" type="boolean"/>
<property name="Comentarios" column="Comentarios" not-null="false" length="400" type="string"/>
<property name="Direccion" column="Direccion" not-null="true" length="200" type="string"/>
<property name="EMail" column="EMail" not-null="false" length="50" type="string"/>
<property name="Fax" column="Fax" not-null="false" length="20" type="string"/>
<property name="Telefono" column="Telefono" not-null="true" length="20" type="string"/>
<union-subclass name="clientes.Empresa" table="Empresas">
<property name="Denominacion" column="Denominacion" not-null="true" length="100" type="string"/>
<property name="RazonSocial" column="RazonSocial" not-null="true" length="100" type="string"/>
<property name="SitioWeb" column="SitioWeb" not-null="false" length="50" type="string"/>
<property name="CUIT" column="CUIT" not-null="true" length="50" type="string"/>
</union-subclass>
<!-- <union-subclass name="clientes.Cliente" table="Ventas">
</union-subclass> -->
</class>
|
|