-->
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: Need help mapping Hashmap of other class
PostPosted: Thu Sep 09, 2004 1:05 pm 
Newbie

Joined: Thu Aug 12, 2004 9:32 am
Posts: 17
Hi,
I managed recently to map a Hashmap of 2 string into 2 database tables.

I need to Map a property which is a Hashmap of other persistent class :
Code:
classA
-----------
a_ID,
Hashmap myHM    <-- hashmap of :  (index=b_id , value=classB)
property1
property2
property3


classB
---------
b_ID,
property1
property2
property3


I dont know how to approach that ! should I create 3 tables in schema ?
can i manage that only with 2 ?
will i be able save object of classB only by saving classA ???
how should my tables look like ? should I use Blob to save the ClassB in the blob like :

<map name="myHM" table="CLASS_BP">
<key column="MAP_ID"/>
<index column="MAP_IDX" type="string"/>
<element column="MAP_VALUE" type="????"/>
</map>

I will appreciate any 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.