protected function assignPrimaryKey(array & $mappers)
    {
        $foundPrimary = false;

        foreach ($mappers as $mapper) {
            if ($foundPrimary) {
                $mapper->field->isPrimary = false;
                $mapper->field->isAutoIncrement = false;
                continue;
            }

            if ($mapper->field->isPrimary()) {
                $mapper->field->isPrimary = true;
                $foundPrimary = true;
            }
        }

        return $this;
    }
protected function assignPrimaryKey(array & $mappers)
    {
        $foundPrimary = false;

        foreach ($mappers as $mapper) {
            if ($foundPrimary) {
                $mapper->field->isPrimary = false;
                $mapper->field->isAutoIncrement = false;
                continue;
            }

            if ($mapper->field->isPrimary()) {
                $mapper->field->isPrimary = true;
                $foundPrimary = true;
            }
        }

        return $this;
    }
protected function assignPrimaryKey ( array & $ mappers ) { $ foundPrimary = false ; foreach ( $ mappers as $ mapper ) { if ( $ foundPrimary ) { $ mapper -> field -> isPrimary = false ; $ mapper -> field -> isAutoIncrement = false ; continue ; } if ( $ mapper -> field -> isPrimary ( ) ) { $ mapper -> field -> isPrimary = true ; $ foundPrimary = true ; } } return $ this ; }
Assigned and fix the primary key field of the given collection.

@param array $mappers

@return $this
Assigned and fix the primary key field of the given collection .