From f8e1459b7e42e439b903ac51bd87e33510c96cf8 Mon Sep 17 00:00:00 2001
From: aleksandrovpv
Date: Thu, 25 Jun 2026 12:43:43 +0400
Subject: [PATCH] Document JpqlFilter entity parameter behavior
An entity-typed parameterClass passes the selected entity's id to the
query, so the where clause must compare against the id
({E}.customer.id = ?). Added as a note under jpqlFilter.
Relates to jmix-framework/jmix#5355.
Co-Authored-By: Claude Opus 4.8 (1M context)
---
.../pages/vc/components/genericFilter-components.adoc | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/content/modules/flow-ui/pages/vc/components/genericFilter-components.adoc b/content/modules/flow-ui/pages/vc/components/genericFilter-components.adoc
index 74abd2e9..f6e6c5d2 100644
--- a/content/modules/flow-ui/pages/vc/components/genericFilter-components.adoc
+++ b/content/modules/flow-ui/pages/vc/components/genericFilter-components.adoc
@@ -82,6 +82,11 @@ include::example$onboarding/src/main/resources/com/company/onboarding/view/compo
<2> Optional `join` clause.
<3> Mandatory `where` clause. `?` indicates the parameter that is entered by the user.
+[NOTE]
+====
+When `parameterClass` is an entity type, `jpqlFilter` passes the *identifier* of the selected entity as the query parameter, not the entity instance. Compare against the id of the association in the `where` clause, for example `{E}.customer.id = ?`. Comparing the association reference directly (`{E}.customer = ?`) does not match any records.
+====
+
//todo: add example with hasInExpression="true" upon completing jmix ticket #1442
=== Programmatic Configuration