-->
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.  [ 4 posts ] 
Author Message
 Post subject: redefine dtd
PostPosted: Mon May 23, 2005 3:01 pm 
Newbie

Joined: Mon May 23, 2005 2:41 pm
Posts: 2
I am trying to use a single xml file for the hibernate mapping document and information for a custom application. I would like to add a custom attribute to the already defined elements (for example a property).

I would like to be able to do something like this:
<property name="name" column="NAME" type="string" length="100" not-null="true" myAttribute="1" />

Any suggestions on where to start or how to do this?


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 23, 2005 9:09 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
use the meta data faciltiy rather than a direct attribute.


Top
 Profile  
 
 Post subject: custom meta data
PostPosted: Tue Jun 07, 2005 1:53 pm 
Newbie

Joined: Mon May 23, 2005 2:41 pm
Posts: 2
How do I do that?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 07, 2005 7:20 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
Try this out:

Code:
    <property name="name" column="NAME" type="string" length="100" not-null="true">
        <meta attribute="myAttribute">1</meta>
    </property>


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.