Refactor set operation - Now set is atomic for models which have AssociatedModel properties