private function _getForeignKeyFieldValue($field) {
        $fields = null;

        if (gettype($field->value) != 'object') {
            if (is_array($field->value)) {
                $fields = $field->value;
            }
            else {
                $fields = [$field->value];
            }
        }
        else if (get_class($field->value) != 'System\Collection\Collection') {
            $fields = $field->value->data();
        }
        else if (get_class($field->value) != 'System\Orm\Entity\Type\File') {
            $fields = [$field->value];
        }

        return $fields;
    }