• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to use map/bag/set/array while using hibernate annotations

 
Raaja Gotluru
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am using hibernate annotations. I am able to use List object. But I dont know how to use Map/Bag/Set/Array collections in hibernate annotations.

I googled but I didnt find any answer.

Please let me know how to use them.

Thanks n regards,
raaja g
 
Hebert Coelho
Ranch Hand
Posts: 754
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Set you can use the same way you with List. Array... why do you want to use it?

Map you can see here how I did with JPA. You can change to hibernate config "Ordering a List and using a Map as mapped attributes"
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!