KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have two entities with a one-to-one unidirectional relationship: class Foo { ... /** * @OneToOne(targetEntity="Bar") */ private $bar; ... } class Bar { ... } When I try to delete a Bar entity I get this error: Integrity constraint violation: 1451 Cannot delete or update a parent row: a foreign key constraint fails How do I keep a unidirectional relationship without loosing the ability to delete Bar entities?
Tags (comma-separated)
Save Edits
Cancel