Hibernate version: 3.2.1
Name and version of the database you are using: Oracle 10g
Hi guys, this is my first time posting here so thanks in advance for any help...
We've got an unusual ManyToMany relationship with a view as the JoinTable. We still need to perform deletes but can't have hibernate auto-deleting from the JoinTable (which bombs because it's a view). Here is a simplified version of our mapping:
Code:
@ManyToMany(targetEntity = Foo.class)
@JoinTable(name = "COMPLEX_VIEW",
joinColumns = {
@JoinColumn(name = "FID",referencedColumnName="FID") },
inverseJoinColumns = {
@JoinColumn(name = "ZID",referencedColumnName="ZID")
})
@OnDelete(action=OnDeleteAction.NO_ACTION)
private Set<Foo> foos = new HashSet<Foo>();
We tried using the OnDelete=No_Action annotation but it appears to be bugged (
http://opensource.atlassian.com/projects/hibernate/browse/ANN-30).
Does anyone have any ideas how we could work around this problem?
Thanks,
Mark.