orm icon indicating copy to clipboard operation
orm copied to clipboard

fix: Quote custom types correctly in SQLFilter

Open cedricziel opened this issue 1 year ago • 1 comments

This enables the connection to quote the parameters correctly according to the type definition.

My scenario:

  • Symfony 7.1 app
  • doctrine/dbal:3.8.2
  • doctrine/orm:3.2.1, currently updating from doctrine/orm:2.19.5
  • I am using the UlidType from the doctrine bridge (using symfony/ulid underneath) as primary key to the Organization entity

My problem:

I'm using a SQLFilter to permanently set the ulid of the organization permanently for users. After updating doctrine/orm, I got an exception that the format of the query parameter wouldn't conform to the expectation of the database.

My solution

On investigation, I found that the SQLFilter doesn't use the column type to quote the value correctly. This change is supposed to ensure that the correct quoting is done

cedricziel avatar Jul 09 '24 10:07 cedricziel

Thank you for your PR. Please always write tests that cover your change.

What problem does this change fix? Note that the type parameter has been removed from DBAL.

derrabus avatar Jul 09 '24 14:07 derrabus

There hasn't been any activity on this pull request in the past 90 days, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 7 days. If you want to continue working on it, please leave a comment.

github-actions[bot] avatar Nov 18 '24 03:11 github-actions[bot]

This pull request was closed due to inactivity.

github-actions[bot] avatar Nov 26 '24 03:11 github-actions[bot]