0
votes

I just have a short question.

There's no description in the following API overview of TYPO3 how to use a "BINARY" in where() clause: https://docs.typo3.org/m/typo3/reference-coreapi/master/en-us/ApiOverview/Database/QueryBuilder/Index.html#expr

What I want to achieve? this one:

WEHRE BINARY `buyer_code` = "f#F67d";

Actually I can only do the following:

->where(
  $queryBuilder->expr()->eq('buyer_code', 'f#F67d')
);

But in this case I don't get a satisfying result for myself because I need case-sensitive here :-)

An another buyer_code exists "f#F67D" (the last char is uppercase) but I do need to look for the other one.

Thanks for helping.

2
do you have to do it on the repository or is there the option to make the request via QueryBuilder?Aristeidis Karavas

2 Answers

0
votes

Since TYPO3 is using Doctrine API here, you could try to do

->where('BINARY `buyer_code` = ' . $queryBuilder->createNamedParameter('f#F67d'))

Please keep in mind, that this query now only works for database backends, supporting the BINARY keyword!

0
votes

Please have a look at Doctrine2 case-sensitive query The thread is a bit older, but seems to cover background and solution for your problem.