Ramesh Reddy created TEIID-2727:
-----------------------------------
Summary: Like operator does not work in MongoDB translator
Key: TEIID-2727
URL:
https://issues.jboss.org/browse/TEIID-2727
Project: Teiid
Issue Type: Bug
Components: Misc. Connectors
Affects Versions: 8.4
Reporter: Ramesh Reddy
Assignee: Ramesh Reddy
Fix For: 8.6
The issue is similar to
http://stackoverflow.com/questions/5608584/how-to-query-mongodb-with-like...
for query like
{code}
select * from city where city like 'ACM%'
{code}
Current query expression generated which is correct for javascript environment is
{code}
$match:{ "city" : "/^ACM/"}
$project:{ "_m0" : "$_id" , "_m1" : "$city" ,
"_m2" : "$state" , "_m3" : "$pop"}
{code}
but when executing from java, java driver wants like
{code}
$match:{ "city" : { "$regex" : "^ACM"}}
$project:{ "_m0" : "$_id" , "_m1" : "$city" ,
"_m2" : "$state" , "_m3" : "$pop"}
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira