Hi,
I can’t see, what I am doing wrong.
I have two entities, l9003WkflowHdr and l9003WkflowDtl.
There should be an error message, when I try to remove a row in the …Hdr table when it has related rows in the …Dtl table.
Here are the part of the code in the …Hdr.java and …Dtl.java
HDR:
@NamePattern("%s|wkflowKey")
@DesignSupport("{'imported':true}")
@Table(name = "l_9003_wkflow_hdr")
@Entity(name = "cdlwkfl$L9003WkflowHdr")
public class L9003WkflowHdr extends BaseStringIdEntity {
private static final long serialVersionUID = 5532332733376260913L;
@OneToMany(mappedBy = "wkflowKey")
protected List<L9003WkflowDtl> l9003WkflowDtls;
DTL:
@NamePattern("%s|wkflowDtlKey")
@DesignSupport("{'imported':true}")
@Table(name = "l_9003_wkflow_dtl")
@Entity(name = "cdlwkfl$L9003WkflowDtl")
public class L9003WkflowDtl extends BaseStringIdEntity {
private static final long serialVersionUID = 812101951986642507L;
@OnDeleteInverse(DeletePolicy.DENY)
@ManyToOne(fetch = FetchType.LAZY, optional = false)
@JoinColumn(name = "wkflow_key")
protected L9003WkflowHdr l9003WkflowHdr;
When I remove a …Hdr row, I do not get any error message when there are related rows in …Dtl.
Any help would be fine.
Thx Roland