Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

one to many relationship using a map with string key

 
Sanjay Jha
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,

Please see the following code..



and



then client as follows :-


c
After running the client the issue is that "BBS" and "KOL" values are not getting stored in CAPSTATES_KEY column and coming as null. Could anyone please let me know, why this is understanding. As per my understanding from pro jp2 book, it should get stored -page 117 listing 5.9
I am using jpa+Hibernate with MySQL.

Thanks & regards,
Sanjay
 
Arun Kumarr
Ranch Hand
Posts: 662
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A question somewhat similar is asked here.
Can you try using @Mapkey?
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!