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.  [ 1 post ] 
Author Message
 Post subject: Any tag relation, meta value is null ?
PostPosted: Tue Oct 27, 2009 4:12 am 
Newbie

Joined: Tue Oct 27, 2009 4:01 am
Posts: 1
Hi,


I ve been trying to work out an any relation but I have an issue with the meta value :
Code:
<any name="handler"  meta-type="string" id-type="long" cascade="all">
   <meta-value value="A" class="A"/>
   <meta-value value="B" class="B"/>
   <column name="handlerType"/>
   <column name="handlerId"/>
</any>


Code:
<class name="A" table="A">
   <id name="handlerId" column="handlerId">
      <generator class="native"/>
   </id>
</class>
<class name="B" table="B">
   <id name="handlerId" column="handlerId">
      <generator class="native"/>
   </id>
</class>


I use a setHandler() method in java to assign the handler. All the handler A and B inherit from a Handler class. What i dont understand is why the column handlerType is null in the database and the handlerId is correctly assigned the correct value.

Thanks for your help.


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

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.