[jira] Created: (JCR-2379) BindVariable not registered in JCR-SQL2 CONTAINS

3 messages Options
Embed this post
Permalink
JIRA jira@apache.org

[jira] Created: (JCR-2379) BindVariable not registered in JCR-SQL2 CONTAINS

Reply Threaded More More options
Print post
Permalink
BindVariable not registered in JCR-SQL2 CONTAINS
------------------------------------------------

                 Key: JCR-2379
                 URL: https://issues.apache.org/jira/browse/JCR-2379
             Project: Jackrabbit Content Repository
          Issue Type: Bug
          Components: query
    Affects Versions: 2.0-beta1
            Reporter: Philipp Bunge


The following fails with a "java.lang.IllegalArgumentException: not a valid variable in this query:"

Query query = qm.createQuery("SELECT * FROM [my:document] AS document WHERE CONTAINS(document.original, $x)", Query.JCR_SQL2);
query.bindVariable("x", vf.createValue("moo"));

And query.getBindVariableNames() returns an empty array.

The FullTextSearchExpression _is_ however correctly parsed as a BindVariableValueImpl:
((FullTextSearch) ((QueryObjectModelImpl) query).getConstraint()).getFullTextSearchExpression() instanceof BindVariableValue


--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

JIRA jira@apache.org

[jira] Updated: (JCR-2379) BindVariable not registered in JCR-SQL2 CONTAINS

Reply Threaded More More options
Print post
Permalink

     [ https://issues.apache.org/jira/browse/JCR-2379?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marcel Reutegger updated JCR-2379:
----------------------------------

    Component/s:     (was: query)
                 jackrabbit-spi-commons

This is a bug in the spi-commons module

> BindVariable not registered in JCR-SQL2 CONTAINS
> ------------------------------------------------
>
>                 Key: JCR-2379
>                 URL: https://issues.apache.org/jira/browse/JCR-2379
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-spi-commons
>    Affects Versions: 2.0-beta1
>            Reporter: Philipp Bunge
>
> The following fails with a "java.lang.IllegalArgumentException: not a valid variable in this query:"
> Query query = qm.createQuery("SELECT * FROM [my:document] AS document WHERE CONTAINS(document.original, $x)", Query.JCR_SQL2);
> query.bindVariable("x", vf.createValue("moo"));
> And query.getBindVariableNames() returns an empty array.
> The FullTextSearchExpression _is_ however correctly parsed as a BindVariableValueImpl:
> ((FullTextSearch) ((QueryObjectModelImpl) query).getConstraint()).getFullTextSearchExpression() instanceof BindVariableValue

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

JIRA jira@apache.org

[jira] Resolved: (JCR-2379) BindVariable not registered in JCR-SQL2 CONTAINS

Reply Threaded More More options
Print post
Permalink
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/jira/browse/JCR-2379?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marcel Reutegger resolved JCR-2379.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 2.0.0

Fixed in revision: 832676

> BindVariable not registered in JCR-SQL2 CONTAINS
> ------------------------------------------------
>
>                 Key: JCR-2379
>                 URL: https://issues.apache.org/jira/browse/JCR-2379
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-spi-commons
>    Affects Versions: 2.0-beta1
>            Reporter: Philipp Bunge
>             Fix For: 2.0.0
>
>
> The following fails with a "java.lang.IllegalArgumentException: not a valid variable in this query:"
> Query query = qm.createQuery("SELECT * FROM [my:document] AS document WHERE CONTAINS(document.original, $x)", Query.JCR_SQL2);
> query.bindVariable("x", vf.createValue("moo"));
> And query.getBindVariableNames() returns an empty array.
> The FullTextSearchExpression _is_ however correctly parsed as a BindVariableValueImpl:
> ((FullTextSearch) ((QueryObjectModelImpl) query).getConstraint()).getFullTextSearchExpression() instanceof BindVariableValue

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.