constraint duplicate query xpath Jahia 7.3 Jahia 8
XPath query returns duplicate entry
Some XPath query returns duplicate entry. here is an example of such query
Is there a way to get unique nodes?
To prevent duplicate entries, you need to add a language constraint. So the query is returning the main node and the translation node. Here is what you could do
- if you add
)will return just the main nodes
- Or add
= 'en'will return just the nodes translated to English
You could also switch to SQL-2, then the duplicate is filtered automatically .