module ViewModel::ActiveRecord::AssociationManipulation
def replace_associated(association_name, update_hash, references: {}, deserialize_context: self.class.new_deserialize_context)
ensure that the update hash for a shared entity is unique, and
referencing. Reference and shared associations are excluded to
of direct update hashes, regardless of their
is to say, that owned associations should be presented in the form
with the notable exception of referenced+shared associations. That
This interface deals with associations directly where reasonable,
hash(es). Only mentioned member(s) will be returned.
Replace the current member(s) of an association with the provided
def replace_associated(association_name, update_hash, references: {}, deserialize_context: self.class.new_deserialize_context) _updated_parent, changed_children = self.class.replace_associated_bulk( association_name, { self.id => update_hash }, references: references, deserialize_context: deserialize_context ).first changed_children end