code_junkie

How do I map a Map from an Entity to a Value with hibernate annotations

Nov 14th, 2011
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.17 KB | None | 0 0
  1. @CollectionOfElements(targetElement=Integer.class)
  2. @MapKeyManyToMany(targetEntity=Product.class)
  3. private Map<Product, Integer> map = new HashMap<Product, Integer>();
Add Comment
Please, Sign In to add comment