-->
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: Can I treat components as reusable?
PostPosted: Wed Sep 15, 2004 12:46 pm 
Newbie

Joined: Mon Sep 13, 2004 11:33 am
Posts: 9
Location: Raleigh, NC
I would like to be able to reuse a component in a number of class definitions, for example:

Code:
<class name="foo">
  <component name="name" class="PersonName">
    <property name="firstname"/>
    <property name="lastname"/>
  </component>
</class>

<class name="bar">
  <component name="name" class="PersonName">
    <property name="firstname"/>
    <property name="lastname"/>
  </component>
</class>


As far as I can tell I have to specify all the properties I want to have appear on my class from the component, so that if I redefine the meaning of PersonName in one place I have to replicate the change in all places. I would have liked the ability to reference a component as well, so that I can simply define it once and reuse throughout. I know I can do this with a class for the component, I'd just rather not.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 15, 2004 1:01 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
XML has &entity; placeholders.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


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.