mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-08-28 13:36:12 +02:00
Without this fix, multiple Database objects will use the same DBConnector object, meaning that SilverStripe can’t connect to multiple databases. This fix ensures that the service cache generates new DBConnector subclasses each time it is called.
23 lines
527 B
YAML
23 lines
527 B
YAML
---
|
|
name: databaseconnectors
|
|
---
|
|
Injector:
|
|
MySQLPDODatabase:
|
|
class: 'MySQLDatabase'
|
|
properties:
|
|
connector: %$PDOConnector
|
|
schemaManager: %$MySQLSchemaManager
|
|
queryBuilder: %$MySQLQueryBuilder
|
|
MySQLDatabase:
|
|
class: 'MySQLDatabase'
|
|
properties:
|
|
connector: %$MySQLiConnector
|
|
schemaManager: %$MySQLSchemaManager
|
|
queryBuilder: %$MySQLQueryBuilder
|
|
MySQLiConnector:
|
|
class: 'MySQLiConnector'
|
|
type: prototype
|
|
PDOConnector:
|
|
class: 'PDOConnector'
|
|
type: prototype
|