FIX: Don’t reuse DBConnector (fixes #4735)

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.
This commit is contained in:
Sam Minnee 2015-11-11 16:57:49 +13:00
parent 46eaee5be1
commit a40812ac33

View File

@ -14,3 +14,9 @@ Injector:
connector: %$MySQLiConnector
schemaManager: %$MySQLSchemaManager
queryBuilder: %$MySQLQueryBuilder
MySQLiConnector:
class: 'MySQLiConnector'
type: prototype
PDOConnector:
class: 'PDOConnector'
type: prototype