Hello
I have a class which contains an attribute named “food” of the type “Page”. It has the ‘Use Suggest’ checkbox clicked, the ‘Relational Storage’ checkbox and the following Hibernate Query in which I try to find all pages containing objects of some other classes of mine.
, BaseObject as obj where doc.fullName = obj.name and ( obj.className = 'Diät.Code.IngridientClass' or obj.className = 'Diät.Code.Food Class' ) and not doc.fullName like '%.Code.%'
The suggestion box doesn’t suggest some of the newly pages I created and added objects to:
Other queries for older pages work fine. When I copy the exact same query into a page however, the pages do show up. For example, the following query
{{velocity}}
$services.query.hql(", BaseObject as obj where doc.fullName = obj.name and ( obj.className = 'Diät.Code.IngridientClass' or obj.className = 'Diät.Code.Food Class' ) and not doc.fullName like '%.Code.%'").execute()
{{/velocity}}
yields the following result:
When I delete the hibernate query from the attribute of my class, everything works as expected:
I don’t think this is a UI/Browser-Cache-Problem. I’ve already cleared the cache, used a private window and the missing pages are not showing up in the request at rest/wikis/xwiki/classes/Diät.Code.Meal Class/properties/food/values?fp=Mystery&limit=10
in the network tab of my browser, which only yields:
{
"links": [
{
"href": "http://127.0.0.1:10010/rest/wikis/xwiki/classes/Di%C3%A4t.Code.Meal%20Class/properties/food",
"rel": "http://www.xwiki.org/rel/property",
"type": null,
"hrefLang": null
}
],
"propertyValues": []
}
Is there a cache for hibernate queries which needs to be refreshed? If so, how do I do that? Am I doing something else wrong?
I appreciate any help you can offer.
Greetings from Germany,
Felix Herrmann