protected function initMappings()
    {
        if ($this->initialized) {
            return $this;
        }

        foreach ($this->classMetadata->fieldMappings as $key => $mapping) {
            if (isset($mapping['reference'])) {
                $this->associationMappings[$key] = $mapping;
            } else {
                $this->fieldMappings[$key] = $mapping;
            }
        }

        $this->initialized = true;

        return $this;
    }