Skip to content

bug: ModelCriteria::update support for accepting Criteria object is broken#2005

Open
kasparsj wants to merge 3 commits intopropelorm:masterfrom
kasparsj:fix-setnull
Open

bug: ModelCriteria::update support for accepting Criteria object is broken#2005
kasparsj wants to merge 3 commits intopropelorm:masterfrom
kasparsj:fix-setnull

Conversation

@kasparsj
Copy link
Copy Markdown
Contributor

@kasparsj kasparsj commented Apr 26, 2024

Even though ModelCriteria::update does accept a Criteria object for $values argument, further down the line basePreUpdate and preUpdate method require explicitly an array.

So this PR fixes the bug by using an array in onDeleteSetNull instead.

If this is going to be merged as it is, then probably we should also make ModelCriteria::update accept explicitly array for $values, which I haven't included, since my main goal was to fix doOnDeleteSetNull

@kasparsj kasparsj changed the title ModelCriteria::update support for accepting Criteria object is broken bug: ModelCriteria::update support for accepting Criteria object is broken Apr 26, 2024
@PhilinTv PhilinTv added this to the 2.0.0 Beta 5 - LTS Release milestone Jun 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants