FORGE-996 Corrected the deletion logic for OneToOne bidi.

Also corrected the logic generated for the owning side of ManyToMany bidi.