I'm currently migrating an old TYPO3 application from $GLOBALS['TYPO3_DB']
to Doctrine.
In the old application there was a case sensitive search with the BINARY operator:
$whereClause = 'BINARY myfieldname LIKE "%' . $query . '%"';
I tried to migrate it like this:
$queryBuilder->expr()->like('BINARY myfieldname', $queryBuilder->createNamedParameter('%' . $queryBuilder->escapeLikeWildcards($query) . '%'))
Another attempt was like this:
$queryBuilder->expr()->like('BINARY `myfieldname`', $queryBuilder->createNamedParameter('%' . $queryBuilder->escapeLikeWildcards($query) . '%'))
This always ends up with an error message:
Unknown column 'BINARY `label`' in 'where clause'
Unfortunately there is no way to change anything at the MySQL server settings.
I've found this question but it didn't help me.
Any other ideas?