-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Closed
Labels
Milestone
Description
This is a (multiple allowed):
-
bug
-
enhancement
-
feature-discussion (RFC)
-
CakePHP Version: 3.5.1.
What I did
I created a table Pages with an hasMany association Images, the foreign key is "foreign_key", dependent and cascadeDelete are both true. The Image table on its own has a hasMany association Translations, the foreign key is "foreign_key", dependent and cascadeDelete for this association are also true.
What happened
When I try to delete a Page I got the "column foreign_key in where clause is ambiguous" exception.
The exception is thrown from the DependentDeleteHelper.
The created conditions are lacking the table aliasses.
What you expected to happen
That deleting a page also triggers the callbacks for deleting an image and that image its translations