Skip to content


DDC-2668: DQL TRIM function is not converted into TRIM SQL correctly #3405

doctrinebot opened this Issue · 1 comment

1 participant


Jira issue originally created by user slavik2121:


Using DQL to generate SQL TRIM code won't trim '0'.
For ex., this expression doesn't work:

$queryBuilder->andWhere("TRIM (LEADING '0' FROM t.field) LIKE :field")

This is happening as whenever TRIM DQL is converted into SQL, trimming character is checked for being 'false' multiple times. In php, both 0 and '0' are equaled to false.



Issue was closed with resolution "Fixed"

@doctrinebot doctrinebot added this to the 2.4.1 milestone
@doctrinebot doctrinebot closed this
@doctrinebot doctrinebot added the Bug label
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.