public function getOwningTable($fieldName)
    {
        if (isset($this->owningTableMap[$fieldName])) {
            return $this->owningTableMap[$fieldName];
        }

        switch (true) {
            case isset($this->class->associationMappings[$fieldName]['inherited']):
                $cm = $this->em->getClassMetadata($this->class->associationMappings[$fieldName]['inherited']);
                break;

            case isset($this->class->fieldMappings[$fieldName]['inherited']):
                $cm = $this->em->getClassMetadata($this->class->fieldMappings[$fieldName]['inherited']);
                break;

            default:
                $cm = $this->class;
                break;
        }

        $tableName          = $cm->getTableName();
        $quotedTableName    = $this->quoteStrategy->getTableName($cm, $this->platform);

        $this->owningTableMap[$fieldName] = $tableName;
        $this->quotedTableMap[$tableName] = $quotedTableName;

        return $tableName;
    }