I have troubles with following relationship:
@Entity
public class Account {
@OneToMany
private Map<SomeEntity, WrapperEntity> myMap;
// getter, setters, etc.
}
With the Wrappper Entity:
@Entity
public class WrapperEntity {
@OneToMany
private Set<SomeOtherEntity> otherEntities;
}
When i try to run this, i get an EclipseLink exception:
Exception [EclipseLink-93] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.DescriptorException
Exception Description: The table [WRAPPERENTITY] is not present in this descriptor.
But: if i make the relationship bidirectional and add a mappedBy
to the Account class, the project will run. Is this behavior intended? Have i overlooked something?
When using bidirectional relationship, another think seems strange to me: the tables are filled in an incomplete way, I think. The table WrapperEntity
has the column myMap_key
, in which nothing is stored if i save a corresponding map entry. I looked for bugs in eclipselink, but couldn't find something similar.