JCR query jcr:path wildcards

Why doesn’t this query work:


select rx:sys_contentid, rx:sys_revision from nt:base where jcr:path like '%/Foo'

It seems like the only wildcard that is supported is % at the end of the value, and I can’t place the wildcard anywhere else in the path string.

Has anyone else run into this?

What I really want to do is something like this:

where jcr:path like ‘//Sites/<any folder>/Foo’

nevermind… it looks like ‘//Sites/%/Foo’ will work, but ‘%/Foo’ does not.
oh, and you have to use rx:sys_folderid, not rx:sys_revision… silly me.