-->
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: Use of 'meta-value's in 'any' mapping usertypes
PostPosted: Tue Jul 06, 2004 12:16 pm 
Newbie

Joined: Wed Jun 16, 2004 6:49 am
Posts: 4
The hibernate documentation demonstrates the passing of meta information into a standard Type class via the meta-value element:

Code:
<any name="anyEntity" id-type="long" meta-type="string">
<meta-value value="TBL_ANIMAL" class="Animal"/>
<meta-value value="TBL_HUMAN" class="Human"/>
<meta-value value="TBL_ALIEN" class="Alien"/>
<column name="table_name"/>
<column name="id"/>
</any>


Is it possible to pass meta information into a UserType class? eg:

Code:
<any name="anyEntity" id-type="long" meta-type="eg.custom.CustomUserType">
<meta-value value="param0" class="eg.custom.CustomClass"/>
<column name="table_name"/>
<column name="id"/>
</any>


If so how can these meta-value parameters be accessed from within the usertype?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 06, 2004 6:32 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
This is already possible in Hibernate3 CVS via paramterizalbe types. Not in 2.1.x though.


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.