Hi Karthik!

You can see all the available options that are accepted by Symfony's
Doctrine configuration here:
http://symfony.com/doc/current/reference/configuration/doctrine.html#doctrine-dbal-configuration

You'll notice that there is no "driverOptions". But, I do know that when
you configure Doctrine's DBAL directly, this option exists. It turns out
that - for whatever reason - the key you want to use is simply "options".
The "options" configuration key is passed internally as the "driverOptions"
when configuring the DBAL (nerdy internal link to that:
https://github.com/doctrine/DoctrineBundle/blob/master/DependencyInjection/DoctrineExtension.php#L181
)

Good luck!

Ryan Weaver
US Office Head & Trainer - KnpLabs - Nashville, TN
http://www.knplabs.com <http://www.knplabs.com/en>
http://knpuniversity.com
Twitter: @weaverryan


On Thu, Nov 8, 2012 at 4:24 PM, karthik sethupat <iam.sskart...@gmail.com>wrote:

> Hello,
>
> I have set *driverOptions* in the config file as mentioned in the
> doctrine DBAL documentation.
>
> But this gives and error
>
> 1/1 InvalidConfigurationException: Unrecognized options "driverOptions"
> under "doctrine.dbal.connections.**pdoDevCon"
>
> My config file is
>
> dbal:
>       default_connection: pdoDevCon
>       connections:
>         pdoDevCon:
>           driver:   %dev_database_driver%    # <
>           host:     %dev_database_host%      # |
>           port:     %dev_database_port%      # | Defined in
>           user:     %dev_database_user%      # |
>           password: %dev_database_password%  # <
>           charset:  UTF8
>           *driverOptions: *{3: 2}
>           mapping_types:
>             enum: string
>             set: string
>
>     orm:
>         auto_generate_proxy_classes: %kernel.debug%
>          pdoDevCon:
>             connection: pdoDevCon
>             mappings:
>               AcmeDemoBundle: ~
>               AcmeHelloBundle: ~
>
>
> I am using PDO::ATTR_ERRMODE as 3 PDO::ERRMODE_EXCEPTION as 2, it does not
> work even if i use the strings.
>
> Is this a bug or am I missing something?
>  Thanks in advance.
>
> Regards,
> Karthik.
>
> --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony developers" group.
> To post to this group, send email to symfony-devs@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-devs+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-devs?hl=en
>

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony developers" group.
To post to this group, send email to symfony-devs@googlegroups.com
To unsubscribe from this group, send email to
symfony-devs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en

Reply via email to