like operator (String)

#1

My application is ready to support different JPA implementation - also ObjectDB. But the automated tests show one little difference. Following search statment will be created by one test case:

select i from User i where i.status = :status and (UPPER(i.email) like :value)

Now we assume that there is a user with following email 'test@mycompany.com'

With :value  = "test" ObjectDB will find the example user. The like statment operates like "test%" 

EclispeLink/OpenJPA/HibernateJPA handles the like stament like an exact search '='. This JPA impls returns an empty list.

This behaviour isn't a problem. The GUI related methods will add implicit a '%' character.

Additional hint:  objectdb-2.4.7_07, alsothere exists an @Index for String email


 

 

 

 

#2

Thank you for this report.

You are right, LIKE with no wildcards should function as =.

Build 2.4.7_17 fixes this behavior.

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
#3

Thanks for the quick fix. This new version 2.4.7_17 fixes this issue.


Post Reply

To post a reply and/or subscribe to update notifications - please login