When making a connection to a MS SQL Server from Symfony2:
$con = Propel::getConnection('default');
I get the following error:
SQLSTATE[IM001]: Driver does not support this function: driver does not support setting attributes
This happens when trying to set the following:
// app/config/config.yml
propel:
database:
connections:
default:
...
attributes:
ATTR_EMULATE_PREPARES: true
However, even when this is removed, the error still persists because the DependencyInjector adds in a default:
// Propel\PropelBundle\DependencyInjection\Configuration
->arrayNode('attributes')
->addDefaultsIfNotSet()
->children()
->booleanNode('ATTR_EMULATE_PREPARES')->defaultFalse()->end()
->end()
->end()
If I remove like so, it works:
->arrayNode('attributes')
->addDefaultsIfNotSet()
->end()
Question: I wonder if the adapter should be checked before adding the default attribute ('ATTR_EMULATE_PREPARES) ?
Stack Trace
in vendor/propel/propel/src/Propel/Runtime/Connection/PdoConnection.php at line 76 -
$attribute = constant($attribute);
}
return parent::setAttribute($attribute, $value);
}
adapter: mssql
driver: pdo_dblib
framework: symfony2
propel version: 2.0.0-dev
When making a connection to a MS SQL Server from Symfony2:
I get the following error:
This happens when trying to set the following:
However, even when this is removed, the error still persists because the DependencyInjector adds in a default:
If I remove like so, it works:
Question: I wonder if the adapter should be checked before adding the default attribute ('ATTR_EMULATE_PREPARES) ?
Stack Trace
adapter: mssql
driver: pdo_dblib
framework: symfony2
propel version: 2.0.0-dev