This discussion is archived
1 Reply Latest reply: May 14, 2013 7:10 AM by cdelahun RSS

need some help for ORM mapping my Beans in JPA2(hibernate) in java.

1008366 Newbie
Currently Being Moderated
I have a two beans. 1. ServerInstance. following are the fields b.url c. adminName d.password. ==> ORM mapping for this is simple and good.

But 2 bean 2.* UserMapping*. following are the fields

a. userName b. Map<ServerInstance, Set<String>> ==> for this i am not able to map. i tried with @ElementColections , but no use. and i also i would like to specify Set<String> as Embeddable and map it.even failed in that.

my mapping table should look some thing like the following . In 3rd table 3 columns will act as compound PK

|1 |ONE |http://dsddsa|name|passrd| |10|TESTUSER| |1 |10 |PRJ1|
|1 |10 |PRJ1|

thanks in advance


  • Correct Answers - 10 points
  • Helpful Answers - 5 points