You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just returns false, nothing else. Even a saveOrFail() here would only return
Cake\ORM\Exception\PersistenceFailedException: Entity save failure.
After a lot of debugging, setting 'atomic' => false into it revealed the message suddenly:
Cake\ORM\Exception\PersistenceFailedException: Entity save failure. Found the following errors (orders.0._joinData.order_id._isUnique: "This value is already in use").
/vendor/cakephp/cakephp/src/ORM/Table.php:1985
I wonder if there isnt a better way of combining assoc issues into the primary error, so the actual issue is visible for local dev and debugging, but also when logging e.g. on prod.
Right now, with default atomic true those would always be invisible it seems.
CakePHP Version
5.0
PHP Version
8.3
The text was updated successfully, but these errors were encountered:
Description
When doing a save operation with associations, the error message on the assocs can be hidden completely.
Just returns false, nothing else. Even a saveOrFail() here would only return
After a lot of debugging, setting
'atomic' => false
into it revealed the message suddenly:I wonder if there isnt a better way of combining assoc issues into the primary error, so the actual issue is visible for local dev and debugging, but also when logging e.g. on prod.
Right now, with default atomic true those would always be invisible it seems.
CakePHP Version
5.0
PHP Version
8.3
The text was updated successfully, but these errors were encountered: