Does anyone can share correct example with @hibernate.map and all its related tags usage with description?
I want to use XDoclet to generate one-to-many relationship using map. My own version of mapping usage is similar to the following:
Code:
....
* @hibernate.map
* cascade = "all"
*
* @hibernate.key
* column = "parentId"
*
* @hibernate.map-key
* column = "someChildProperty"
* type = "java.lang.String"
*
* @hibernate.one-to-many
* class = "com.my.Item"
public Map getItems()
{
return items;
}
...
But while persisting newly created entity with pre-populated map i got 'foreign key contraint voilation' errors.