I have a Hibernate @Embeddable
annotated class like so
@Embeddable
public class DataWrapper {
private DataWrapperType wrapperType;
@ManyToOne
private DataFactorX xFactor;
@ManyToOne
private DataFactorY yFactor;
@ManyToOne
private DataFactorZ zFactor;
// Getters and Setters
}
and it's pretty simply used in another entity
@Entity
public class DataManager {
private DataWrapper dataWrapper;
public DataManager() {
this.dataWrapper = new DataWrapper();
}
}
but when I later retrieve a DataManager
instance from Hibernate, the dataWrapper
field comes back null.
Any explanation?