-->
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: Mapping a table with three strings...
PostPosted: Thu Nov 07, 2013 3:28 pm 
Newbie

Joined: Thu Nov 07, 2013 2:46 pm
Posts: 1
I am a total newby on Hibernate so any info I could get on this would be appreciated. I have a need to add at new table to en existing set of tables that are predefined in an existing application. It currently has something to the effect of the following...

Code:
      <joined-subclass name="TestSubDO" table="testsub">
         <key column="testId" />
         <property name="xId" column="xId" type="string" />
         <property name="y" column="y" type="string" />

         <set name="testa" table="testa" cascade="all">
            <key column="testId" />
            <element column="Value" type="string" />
         </set>
   
         <set name="testb" table="testb" cascade="all">
            <key column="testId" />
            <element column="Value" type="string" />
         </set>
         
         <!-- <list name="testc" table="testc">
            <key column="testId" />
            <list-index column="testContext" name="testContext" type="string"/>
            <property name="testValue" type="string" />
               <column="testValue" name="testValue" type="string" />
            </property>
         </list> -->

         
      </joined-subclass>


This clearly doesn't work for the list I have commented out but I need to insert a table here that has three strings with one of them being the testId which will be a FK to the superclass that this subclass is joined to. The FK relationship should be there but there will not be any primary key in this table. I am struggling to figure out how that would be implemented in this situation. Any ideas?


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.