Query fails to find document if field path starts with "/"

I am sure this is a follow-up problem to something else I did wrong before, but I am stumped at the moment.

I am doing this query from Java code (this is the toString() from the Query object):

[documentModelName=RdnSim_DM, projection=document, fields=, aggregation=, filter={
  "operator" : "AndOperator",
  "operands" : [ {
    "operator" : "ExactMatchOperator",
    "field" : "/RdnSim/ProzedurId",
    "value" : "R1",
    "caseSensitive" : true
  } ]
}, links=, sort=, page=Paging [pageNumber=0, pageSize=2147483647]]

I am getting no results at all.
However, if I am doing the same query but with "field": "RdnSim/ProzedurId" (so without the leading slash), then I find my document.
This is a query from within h2-console:
bild

The document got created by a test in Bruno:
bild

Of course, when I try to do it similarly in a brand new example project based on the project template it works fine.
I’ll keep researching.

I was able to reproduce it based on the project template.

  • It always works fine when querying using REST api.
  • It works fine when querying by a String field’s value using Java API (Person_DM: /Person/PersonalData/FirstName).
  • It works fine when querying by an Enum field’s value using Java API (Person_DM: /Person/PersonalData/Gender).
  • It breaks when querying by by an enum field whose definition comes from an imported TypeDefinition model using Java API

I created Jira issue A12-17577 for that.

Update: This issue has been fixed in 2025.06-ext2.