[2.10] Unable to persist entites while using PrimaryReadReplicaConnection #6856

Open
opened 2026-01-22 15:40:06 +01:00 by admin · 0 comments
Owner

Originally created by @lp-contentplus on GitHub (Oct 8, 2021).

Issue introduced in:
afa837a361

$this->_nextValue = (int) $conn->query($sql)->fetchColumn();

Deprecated method query() calls ensureConnectedToPrimary() inside.
executeQuery() does not.

An exception occurred while executing 'SELECT NEXTVAL('...')':
SQLSTATE[25006]: Read only sql transaction: 7
Originally created by @lp-contentplus on GitHub (Oct 8, 2021). Issue introduced in: https://github.com/doctrine/orm/commit/afa837a3611490adbcf559fa9ea9db9dc04397a9 ``` $this->_nextValue = (int) $conn->query($sql)->fetchColumn(); ``` Deprecated method query() calls ensureConnectedToPrimary() inside. executeQuery() does not. ``` An exception occurred while executing 'SELECT NEXTVAL('...')': SQLSTATE[25006]: Read only sql transaction: 7 ```
admin added the Regression label 2026-01-22 15:40:06 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#6856