You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@metamodel.apache.org by "Dennis Du Krøger (JIRA)" <ji...@apache.org> on 2016/07/12 14:04:20 UTC

[jira] [Created] (METAMODEL-1103) WildcardPattern not anchored to beginning of string.

Dennis Du Krøger created METAMODEL-1103:
-------------------------------------------

             Summary: WildcardPattern not anchored to beginning of string.
                 Key: METAMODEL-1103
                 URL: https://issues.apache.org/jira/browse/METAMODEL-1103
             Project: Apache MetaModel
          Issue Type: Bug
    Affects Versions: 4.5.3
            Reporter: Dennis Du Krøger
            Assignee: Dennis Du Krøger
            Priority: Critical


When filtering using LIKE in {{FilterItem.evaluate()}} (really {{WildcardPattern}}) is not properly anchored to the beginning of the string, which is not consistent with SQL LIKE

Given the table:
||name||
|foobar|
|bar|
|oba|

And the queries:
{code:sql}
SELECT * FROM liketest WHERE name LIKE 'oba%'
SELECT * FROM liketest WHERE name LIKE 'bar'
{code}

PostgreSQL and MS SQL will return the results:
||name||
|oba|

and 

||name||
|bar|


But MetaModel (on a {{QueryPostprocessDataContext}} based source) will return the results:
||name||
|foobar|
|oba|

and 
||name||
|foobar|
|oba|

(Marked critical since it is means errors that are easily missed when looking the results over, but can sneak corruptions in later)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)