protected function extractPrimaryKeyValue($record, $returnAs)
    {
        $record = (object) $record;
        $values = [];
        foreach((array) $this->ORMParameters['primaryKey'] as $field) {
            $values[$field] = $record->$field;
        }
        switch($returnAs) {
            case 's':
                return implode('|', $values);
            break;
            case 'a':
                return $values;
            break;
        }   
    }