Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ISCHILDNODE and ISDESCENDANTNODE not working with %(wildcard) #246

Open
oste opened this issue Feb 16, 2015 · 2 comments
Open

ISCHILDNODE and ISDESCENDANTNODE not working with %(wildcard) #246

oste opened this issue Feb 16, 2015 · 2 comments

Comments

@oste
Copy link

oste commented Feb 16, 2015

I am trying to leverage ISCHILDNODE with a % wildcard using the Query Builder. I am constructing my query like this

$qb->from()->document('AppBundle\Document', 'd');
//$qb->where()->descendant('/my/%/posts', 'd');
$qb->where()->child('/my/%/posts', 'd');

This gives me a SQL-2 query that looks like this SELECT * FROM [nt:unstructured] AS d WHERE (ISCHILDNODE(d, [/my/%/posts]) Unfortunately this is not working :(

It is worth noting that ISDESCENDANTNODE works as expected SELECT * FROM [nt:unstructured] AS d WHERE (ISDESCENDANTNODE(d, [/my/%/posts])

@dantleech was able to confirm that neither of these work with Jackrabbit in #symfony-cmf irc chat. However they should

@dbu
Copy link
Member

dbu commented Feb 20, 2015

this sounds strange. a first step to solve this would be to add such queries to https://github.com/phpcr/phpcr-api-tests/blob/master/tests/06_Query/QuerySql2OperationsTest.php and do a pull request with those. then we can investigate what actually goes on. do you want to do that @oste ?

@oste
Copy link
Author

oste commented Feb 21, 2015

Thanks @dbu, I will try to find some time this week to get that pull request started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants