I have the following entity which fails to create:
@OneToMany( fetch = FetchType.LAZY, orphanRemoval=true, mappedBy="itemA" )
@Cascade( { CascadeType.ALL } )
@MapKey( name="id.customKey" )
private Map<String, ItemB> bMap;
It gives me a:
Invocation of init method failed; nested exception is org.hibernate.AnnotationException: mappedBy reference an unknown target entity property
The ManyToOne class attribute is the following:
@ManyToOne( optional=false )
@NotFound( action=NotFoundAction.EXCEPTION )
@JoinColumn( name="ID_ITEM_B", nullable=false, updatable=true, insertable=true )
private ItemA itemA;
This code seems working fine with a List of ItemB, problem comes when I put a Map in play...how come?