src/Models/BaseDbConfig.php
public static function toStorageFormat(&$config, $old_config = null)
    {
        if (isset($config['allow_upsert'])) {
            $allowUpsert = array_get($config, 'allow_upsert');
            if (!is_bool($allowUpsert)) {
                $config['allow_upsert'] = filter_var($allowUpsert, FILTER_VALIDATE_BOOLEAN);
            }
        }
        if (isset($config['max_records'])) {
            if (!is_int($config['max_records'])) {
                $config['max_records'] = filter_var($config['max_records'], FILTER_VALIDATE_INT);
            }
        }
        if (array_get($config, 'max_records', 0) <= 0 || empty($config['max_records'])) {
            unset($config['max_records']);
        }

        return parent::toStorageFormat($config, $old_config);
    }
public static function toStorageFormat(&$config, $old_config = null)
    {
        if (isset($config['allow_upsert'])) {
            $allowUpsert = array_get($config, 'allow_upsert');
            if (!is_bool($allowUpsert)) {
                $config['allow_upsert'] = filter_var($allowUpsert, FILTER_VALIDATE_BOOLEAN);
            }
        }
        if (isset($config['max_records'])) {
            if (!is_int($config['max_records'])) {
                $config['max_records'] = filter_var($config['max_records'], FILTER_VALIDATE_INT);
            }
        }
        if (array_get($config, 'max_records', 0) <= 0 || empty($config['max_records'])) {
            unset($config['max_records']);
        }

        return parent::toStorageFormat($config, $old_config);
    }
{@inheritdoc}