-->
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: horizontal split of table per concrete class
PostPosted: Thu Nov 09, 2006 5:59 am 
Newbie

Joined: Thu Nov 09, 2006 5:32 am
Posts: 8
Hi
I have the following (simplified) scenario:

class User with properties: id and mailAddress
class Sender that extends User and has 2 additional properties : logoImage and www

I have the "table per concrete class" model.

Table "sender" has the columns id, mailAddress and logoImage.
Also I have the table "sender_www" with columns: senderId and www.

The following mapping works (the property www and table sender_www are not included):

Code:
<hibernate-mapping>
    <class name="com.v2.unit.data.resource.user.User">
        <id name="id" column="id"/>
        <property name="mailAddress"/>
         
        <union-subclass name="com.v2.unit.data.resource.user.Sender" table="sender">
           <property name="logoImage"/>
        </union-subclass>
    </class>
</hibernate-mapping>
How can I add to hibernate the www property?

<join ../> in <union-subclass.../> seems to be not allwoed.

one-to-one also doesn't seem to work here since I don't have a wrapper for www.

Thanks,
Octav


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.