public function addRecord(Record $l)
    {
        if ($this->collRecords === null) {
            $this->initRecords();
            $this->collRecordsPartial = true;
        }

        if (!$this->collRecords->contains($l)) {
            $this->doAddRecord($l);

            if ($this->recordsScheduledForDeletion and $this->recordsScheduledForDeletion->contains($l)) {
                $this->recordsScheduledForDeletion->remove($this->recordsScheduledForDeletion->search($l));
            }
        }

        return $this;
    }