in2code-de / in2publish_core

in2publish Community Version
https://www.in2code.de/produkte/content-publisher/
GNU General Public License v3.0
40 stars 23 forks source link

Record collection uses like() on integer values #84

Closed friggingee closed 3 years ago

friggingee commented 3 years ago

Record collection in \In2code\In2publishCore\Domain\Repository\BaseRepository::findPropertiesByProperty and \In2code\In2publishCore\Domain\Repository\BaseRepository::findPropertiesByProperties uses a like() query on all values which are not an array or null, respectively.

This is inefficient for integer values since it forces a string conversion for expression matching and can't make use of indices for quicker querying.

Use eq() if the currently processed value is an integer or can be interpreted as one per TYPO3 core definition (MathUtility::canBeInterpretedAsInteger).