[1.4.x] Fixed #20905 -- Fixed an Oracle-specific test case failure

Made a test checking ORM-generated query string case-insensitive.

Backport of ee0a7c741e from master