Hello guys.
I need to map my class using these strategies, joined-subclass and sucblass, so, I did this:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class
name="com.mypackage.MySuperClass"
table="my_superclass_table"
>
<id
name="id"
column="id"
type="java.lang.Integer"
>
<generator class="increment"/>
</id>
<discriminator
column="type_class_name"
/>
<property
name="defaultValue"
type="java.lang.String"
update="true"
insert="true"
column="default_value"
/>
<subclass
name="com.mypackage.MySubClass"/>
<joined-subclass
name="com.mypackage.MyJoinedSubClass"
table="my_joinedsubclass_table"
>
<key
/>
<property
name="color"
type="java.lang.String"
update="true"
insert="true"
column="color"
/>
</joined-subclass>
</class>
</hibernate-mapping>
But when I try to star my application, I receive this error message:
Code:
Caused by: org.xml.sax.SAXParseException: The content of element type "class" must match "(meta*,subselect?,cache?,synchronize*,comment?,(id|composite-id),discriminator?,natural-id?,(version|timestamp)?,(property|many-to-one|one-to-one|component|dynamic-component|properties|any|map|set|list|bag|idbag|array|primitive-array|query-list)*,((join*,subclass*)|joined-subclass*|union-subclass*),loader?,sql-insert?,sql-update?,sql-delete?,filter*)".
Can´t I have subclass mapping with joined-subclass?
Thanks
Sigrist