Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Proposal Solution] Exception: SQLSTATE[IM001]: Driver does not support this function: driver does not support that attribute Could not analyze class Modules\Pdm\Models\PickingList\PickingListItem #25

Open
ijpatricio opened this issue Dec 11, 2018 · 0 comments

Comments

@ijpatricio
Copy link

Hello @mpociot

Hope to find you well!

So, with DBAL, for SQL server, is needed to set some option. Already solver this before.
For such connections, to work out of the box, something similar to this will work.

protected function setNeededPdoSettings()
    {
        $connectionsSqlServer = [
            'x3db_v11',
            'roots_sql_server',
            'imos',
        ];

        collect($connectionsSqlServer)
            ->each(function ($item, $key) {
                config()->set("database.connections.{$item}.options",[
                    \PDO::ATTR_PERSISTENT => true
                ]);
            });

    }

It puts that option on the fly, for the current execution.
I could rewrite above snipper to apply such setting to every SQL Server connection, and make a PR.
What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant