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
Hi, I have a User model and within that an embedded phone model. I want to be able to update both the user model and the embedded phone model at the same time to maintain data integrity however the only way I have found to acheive this is to first update the parent, then update the embedded document via the $user->phone() selector? Is there a way I can combine this into one update statement?
This discussion was converted from issue #2295 on July 14, 2021 00:46.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi, I have a User model and within that an embedded phone model. I want to be able to update both the user model and the embedded phone model at the same time to maintain data integrity however the only way I have found to acheive this is to first update the parent, then update the embedded document via the $user->phone() selector? Is there a way I can combine this into one update statement?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions