I have an entity , I mapped a view as a collection to this entity .Now when I call delete for this entity hibernate first tries to delete from view and I get this error
ORA-01752: cannot delete from view without exactly one key-preserved table
I am wondering If I can tell hibernate not to issue delete statement for this view ?
here my entity
Code:
@OneToMany()
@JoinTable(
name="PROG_GRANT_FINDINGS",
joinColumns = { @JoinColumn( name="SYS_AUDIT_PROG_GRANT_ID", insertable=false, updatable=false) },
inverseJoinColumns = @JoinColumn( name="SYS_FINDING_ID", insertable=false, updatable=false)
)
public List<StgFinding> getStgFindings() {
return stgFindings;
}
private void setStgFindings(List<StgFinding> stgFindings) {
this.stgFindings = stgFindings;
}
PROG_GRANT_FINDINGS is a view please suggest how to handle this ?