-->
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 array or map(key,value) across table columns
PostPosted: Wed Dec 12, 2007 3:46 pm 
Newbie

Joined: Wed Dec 12, 2007 3:28 pm
Posts: 2
Hi,

I need to know if a java array or a map can be embedded with an entity object so that the array or map values all appear in one row as separate named (maybe map key or fixed prfix) columns in the database table. I would like to avoid coding this my hand to map 10 elements to columns manually if possible?

ie array
array[1] = "ABC"-> column name array1 = "ABC"
array[2] -> "DEF" -> column name array2 = "DEF"

or map(name,value)
map("column1","value1") -> column1 = value1
map("column2",value2") -> column2 = value2

I saw another question where someone asked a similar question, with an answer that mentioned using dynamic-components but the answer gave no concrete details of how to do it. dynamic component documentation is somewhat limited. I would like a solution using annotations if that is possible.

Can anyone assist?

Regards,
Phil.


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.