-->
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: Defining a tuplizer for a set of dependent objects
PostPosted: Thu Feb 07, 2008 8:46 am 
Beginner
Beginner

Joined: Mon Nov 19, 2007 4:40 pm
Posts: 46
Hibernate version:3.2

I have a mapping with a set of dependent objects, which is not a standard POJO. I have defined a custom component tuplizer (which I use for component (dependent) objects inside other object mappings), but I don't see any way to define the tuplizer (Component allows you to define custom tuplizers). Below is an example mapping... Warranty is a dependent object (interface) that uses a factory to get instantiated (my tuplizer provides a custom instantiator that knows how to do this). If it is not possible to set the tuplizer here, is there anyway to globally set that all components use my custom tuplizer? My custom tupilizer will fall back on the PojoComponentTuplizer for standard POJO objects.

Code:
<set name="warranties" table="WARRANTY" lazy="true">
   <key>
      <column name="ID" />
   </key>
   <composite-element class="sample.package.Warranty">
      <property name="warrantyId" type="java.lang.String">
         <column name="WARRANTY_ID" length="10" />
      </property>
      <property name="duration" type="java.lang.Long">
         <column name="DURATION" precision="22" scale="0" />
      </property>
                .... more properties here ....
   </composite-element>
</set>


Alternatively, is there another way to map a collection (Set) of dependent (component) objects that would allow me to use the Tuplizer element?

This problem has really halted my progress, if anyone has any ideas, please assist.

Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 21, 2008 11:33 pm 
Beginner
Beginner

Joined: Mon Nov 19, 2007 4:40 pm
Posts: 46
Does anyone have any suggestions? I really need a solution.

Thanks.


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.