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
Both \Carsdotcom\LaravelJsonModel\JsonModel::updateRecursive and \Carsdotcom\LaravelJsonModel\JsonModel::safeUpdateRecursive correctly descend into JsonModels with JsonModel attributes, but can't transit through a CollectionOfJsonModels. If you're trying to update one property on one collection member, the entire collection member is overwritten instead.
Smart money might be to expose a common interface like SupportsUpdateRecursive that those methods detect, then implement that method on CollectionOfJsonModels. That's the approach we took with CanCascadeEvents
The text was updated successfully, but these errors were encountered:
Both
\Carsdotcom\LaravelJsonModel\JsonModel::updateRecursive
and\Carsdotcom\LaravelJsonModel\JsonModel::safeUpdateRecursive
correctly descend into JsonModels with JsonModel attributes, but can't transit through a CollectionOfJsonModels. If you're trying to update one property on one collection member, the entire collection member is overwritten instead.Smart money might be to expose a common interface like
SupportsUpdateRecursive
that those methods detect, then implement that method on CollectionOfJsonModels. That's the approach we took withCanCascadeEvents
The text was updated successfully, but these errors were encountered: