protected function ensureAssociation(Collection $related) { if ($related->getAssociation() !== $this) { $related->setAssociation($this); } }