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
{{ message }}
This repository has been archived by the owner on May 26, 2023. It is now read-only.
I posted this on #79 but I think it deserves it's own issue now that #98 has been merged. It appears that the in-memory object cache isn't following the principle of least surprise by allowing callbacks in DomainObjects save instances that were found in controllers.
e.g. We ran into this the other day:
Suppose CreditProduct #1 belongsTo Credit #1.
# In CreditProduct afterSave, we save the credit to bust caches, etc# function afterSave(){# $this->credit->save();# }# In a controller:$credit = Credit::find(1);
$credit->reason = "Hello";
$credit_product = CreditProduct::create(array(
'credit_id' => $credit->id,
'product_id' => 2,
));
# "Hello" has been saved to the db as the credit reason,# even though the afterSave function in CreditProduct should get a new instance.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I posted this on #79 but I think it deserves it's own issue now that #98 has been merged. It appears that the in-memory object cache isn't following the principle of least surprise by allowing callbacks in DomainObjects save instances that were found in controllers.
e.g. We ran into this the other day:
Suppose
CreditProduct #1
belongsToCredit #1
.The text was updated successfully, but these errors were encountered: