As per #2868876: Remove deprecated entitymanager and db_select, the database connection should be injected rather than making a static call to the database service.
| Comment | File | Size | Author |
|---|
As per #2868876: Remove deprecated entitymanager and db_select, the database connection should be injected rather than making a static call to the database service.
| Comment | File | Size | Author |
|---|
Comments
Comment #3
johnpitcairn commentedThe solution proposed by @ushma in #2868876: Remove deprecated entitymanager and db_select is:
$query = $this->database->select('node', 'n', array('target' => 'replica'));This works in that indexing completes, but throws a warning:
Warning: assert(): Passing "target" option to query() has no effect.I think
$this->databaseReplicashould be used to query the database replica.Comment #4
johnpitcairn commentedYup. See #3001216: Use the database.replica service where appropriate. Let's just commit this.
Comment #6
johnpitcairn commented