-->
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: component whithin a class inherits the maeta="extends&q
PostPosted: Wed Feb 23, 2005 10:52 am 
Newbie

Joined: Wed Feb 23, 2005 10:44 am
Posts: 1
[b]Hibernate Tool version:2.1.3[/b]

I have the following mapping which I use to generate java classes:

<class name="ForumRecord" table="FORUM_MESSAGES">
<meta attribute="extends">AbstractRecordBase</meta>
<id name="serial" type="long">
<column name="SERIAL" not-null="true" />
<generator class="native"/>
</id>

<component name="message" class="MessageInfo">
<property name="authorSr" column="AUTHOR_SR" type="long" />
<property name="authorName" column="AUTHOR_NAME" type="string" length="32" not-null="true" />
<property name="body" column="BODY" type="text" not-null="true" />
</component>

...

As I generate java code with hbm2java, I notice that class ForumRecord properly extends AbstractRecordBase, but the class MessageInfo also extends the AbstractRecordBase.
How can I have only ForumRecord to extends AbstractRecordBase and not the classes defined as <component> inside the ForumRecord class?


Also, is there a way to define a component, and all its internal properties once and (re)use it elsewere without having to define again all is properties again?.


Thanks in advance.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 23, 2005 12:16 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
meta inherit="false"

please search forum and doc next time....

regarding reusing definitions then look into xml entity includes.

_________________
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.