Delete cascade not working?
686999May 12 2009 — edited May 12 2009Hi,
I am using Eclipse Link and I was surprised to know that Delete Cascade does not seem to work. Basically, I have an entity which is a composite of another entity and has a OneToMany relationship. I have used Cascade.all.
When I remove the secondary entity from the list of the primary entity, the operation succeeds and it seems that the entity has been deleted. However, a delete SQL is not generated and the record still remains in the DB.
However, after removing the entity from the list and then if I call explicitly EntityManager.remove(), then the record is removed.
Is this a bug? Seems so.
Please let me know, thanks.