I have a RmgtProfileBVOImpl where I define a @OneToMany mapping:
@Entity
@Proxy(proxyClass = RmgtProfileBVO.class)
@Table(name = "rmgt_t_profile")
public class RmgtProfileBVOImpl extends AbstractBasePropertiesImpl implements RmgtProfileBVO {
@OneToMany(mappedBy = "profileId",
targetEntity = RmgtProfileValidationBVOImpl.class,
fetch = FetchType.EAGER,
cascade = CascadeType.ALL,
orphanRemoval = true)
private java.util.Set<RmgtProfileValidationBVO> profileValidations = new HashSet<>();
I can see an error for profileId with this message:
Can’t find inverse attribute
Problem is: the profileId is declared in the implementation (RmgtProfileValidationBVO), not in the interface. But I need the set in ProfileBVOImpl to be of interface-type .
This is what the RmgtProfileValidationBVOImpl looks like:
@Entity
@IdClass(RmgtProfileValidationId.class)
@Table(name = "rmgt_t_profile_validation")
@Proxy(proxyClass = RmgtProfileValidationBVO.class)
public class RmgtProfileValidationBVOImpl implements RmgtProfileValidationBVO {
@Id
@NotNull
@Column(name="fk_profile_id", insertable = false, updatable = false)
public Long profileId;
Is there a solution to this problem? I tried to work with targetEntity attribute but that did not help here.