Skip to content

EntityManager: Quote all identifiers#514

Merged
nilmerg merged 1 commit into
mainfrom
fix/quoting-in-entity-manager
Jul 17, 2026
Merged

EntityManager: Quote all identifiers#514
nilmerg merged 1 commit into
mainfrom
fix/quoting-in-entity-manager

Conversation

@BastianLedererIcinga

Copy link
Copy Markdown
Contributor

The EntityManager must quote identifiers, to allow writing to columns like rule_escalation.condition, which currently fails on MySql.

Call Connection::quoteIdentifier() on all used identifiers, to avoid SQL errors when a reserved keyword is used as column/table name.

The test model Pairing is adjusted to use several keywords so the tests cover this, the RecordingConnection unquotes identifiers when writing to its calls array, so assertions can still use the plain identifiers.

Call `Connection::quoteIdentifier()` on all used identifiers,
to avoid SQL errors when a reserved keyword is used as column/table name.

The test model `Pairing` is adjusted to use several keywords so the tests
cover this, the `RecordingConnection` unquotes identifiers when writing to
its `calls` array, so assertions can still use the plain identifiers.
@cla-bot cla-bot Bot added the cla/signed CLA is signed by all contributors of a PR label Jul 17, 2026
@nilmerg
nilmerg merged commit 27e27a0 into main Jul 17, 2026
13 checks passed
@nilmerg
nilmerg deleted the fix/quoting-in-entity-manager branch July 17, 2026 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla/signed CLA is signed by all contributors of a PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants