-->
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: How to map an Int and the key of a hashmap to a composite id
PostPosted: Sat Apr 17, 2010 9:31 am 
Newbie

Joined: Fri Apr 16, 2010 5:41 pm
Posts: 3
Here's my database setup:

(this is a simple EAV stucture)
-----------------------------
user_id (FK) ----| Composite key
setup_item -----|
setup_value

So, the user_id and setup_item makeup the composite key of the table, on the java side, the only thing to note is that setup_item and setup_value come from a hashmap:

Code:
// Where String is "setup_item" and Object is "setup_value"
Map<String, Object> data = new HashMap<String, Object>()


I'm trying to map this relationship in a setup.hbm.xml file, but I can't figure out how to properly fit setup_item and setup_value into the composite-id. Is there some issue with how I have this setup?


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.