|
You are right; it is not possible to store the map if it contains the same Order under different keys. The official documentation states however that a @OneToMany annotation should be used for Maps, see chapter 7.2.2.2 of http://docs.jboss.org/hibernate/orm/3.6/reference/en-US/pdf/hibernate_reference.pdf
I did not try the suggestion of Zandra Norman, that is use @ManyToMany instead of @OneToMany; I found another workaround which I cannot remember today, I think I simply changed the design of my domain objects.
|