[teiid-issues] [JBoss JIRA] (TEIID-2727) Like operator does not work in MongoDB translator
Ramesh Reddy (JIRA)
jira-events at lists.jboss.org
Tue Nov 5 12:20:02 EST 2013
[ https://issues.jboss.org/browse/TEIID-2727?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ramesh Reddy resolved TEIID-2727.
---------------------------------
Resolution: Done
Correct the generation of MongoDB query.
> 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-using-the-java-api
> 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
More information about the teiid-issues
mailing list