1

I´m trying to find a node by a relative path:

I need to search a node which terminates in : 3265

I´m using queries like that:

SELECT * from [mgnl:news] AS t WHERE ISSAMENODE([/%/3265]) 

I need to know how to find a node by a relative path, thanks

Ducaz035
  • 3,054
  • 2
  • 25
  • 45
Miguel Carrasco
  • 171
  • 1
  • 2
  • 16

2 Answers2

1

That´s the answer:

Select * from [mgnl:news] as t where name(t) = '3265'

This returns my node: /Application/news/3265

Thanks also.

Miguel Carrasco
  • 171
  • 1
  • 2
  • 16
  • Well, it may because you are typically query by name instead of path :) Happy that you found your way, cheers – Ducaz035 Mar 16 '16 at 15:43
0

You may do something like

Select * from [nt:base] where path like '%.%'

For more examples please have a look at https://wiki.magnolia-cms.com/display/WIKI/JCR+Query+Cheat+Sheet

Cheers,

Ducaz035
  • 3,054
  • 2
  • 25
  • 45