-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Problem with modular mapping file
PostPosted: Wed Dec 20, 2006 11:32 am 
Newbie

Joined: Tue Oct 04, 2005 2:45 pm
Posts: 2
Hi All,

I am really new to hibernate. I have a class that extends one abstract class. I want to have the mapping for this class in a separate file. But I get the error when I specify

<union-subclass name="crown.core.domainobjects.personnel.Personnel"
extends="crown.core.domainobjects.Person" table="PERSONNEL">

The content of element type "union-subclass" must match
"(meta*,subselect?,synchronize*,comment?,tuplizer*,(property|many-to-
one|one-to-one|component|dynamic-component|properties|any|map|set|
list|bag|idbag|array|primitive-array)*,union-subclass*,loader?,sql-
insert?,sql-update?,sql-delete?,resultset*,(query|sql-query)*)".


Can someone pl. help me with this? Thank you in advance.

Regards,
Newbie



[b]Hibernate version:[3.2.1.ga/b]

[b]Mapping documents:[/b]

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

<!-- =================================================================== -->
<!-- Mapping for Provider and subclasses and queries. -->
<!-- Table per concrete class -->
<!-- =================================================================== -->
<hibernate-mapping package="crown.core.domainobjects.personnel">

<union-subclass name="crown.core.domainobjects.personnel.Personnel"
extends="crown.core.domainobjects.Person" table="PERSONNEL">



<set name="positions" cascade="all" lazy="false">
<cache usage="read-write" />
<key>
<column name="PERSONNEL_ID" index="PERSONNEL_POSITION_PERSONNEL_ID_IDX">
<comment>Maps to the Personnel table</comment>
</column>
</key>
</union-subclass>
</hibernate-mapping>
[b]Full stack trace of any exception that occurs:

The content of element type "union-subclass" must match
"(meta*,subselect?,synchronize*,comment?,tuplizer*,(property|many-to-
one|one-to-one|component|dynamic-component|properties|any|map|set|
list|bag|idbag|array|primitive-array)*,union-subclass*,loader?,sql-
insert?,sql-update?,sql-delete?,resultset*,(query|sql-query)*)".

[b]Name and version of the database you are using: Oracle 9.1

[b]The generated SQL (show_sql=true):[/b]

[b]Debug level Hibernate log excerpt:[/b]


Problems with Session and transaction handling?

Read this: http://hibernate.org/42.html

[quote][/quote]


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 20, 2006 2:02 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
This is the tools forum, not the user forum.

Read the error message and then check your actual XML (e.g. <cache> does not make sense and is thus not allowed in a union-subclass) and if that is not enough then go to the user forum and ask the question ;)

_________________
Max
Don't forget to rate


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.