This is an automated email from the ASF dual-hosted git repository.
nmalin pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
The following commit(s) were added to refs/heads/trunk by this push:
new 83b89bb518 Fixed: Fix FindGeneric on view entity (#1375)
83b89bb518 is described below
commit 83b89bb518fba4d5e6004ce3f968dbf4e4438a20
Author: Nicolas Malin <[email protected]>
AuthorDate: Tue Jun 23 15:03:18 2026 +0200
Fixed: Fix FindGeneric on view entity (#1375)
When you display a ViewEntity that not contains group by or function,
the EntityQuery failed to resolve selected fields I introduced this
regression after a groovy reformat (adefd159d2) where this empty case
would not well manage
---
.../main/groovy/org/apache/ofbiz/webtools/entity/FindGeneric.groovy | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/framework/webtools/src/main/groovy/org/apache/ofbiz/webtools/entity/FindGeneric.groovy
b/framework/webtools/src/main/groovy/org/apache/ofbiz/webtools/entity/FindGeneric.groovy
index 3479e6fa2e..f96e4f3a91 100644
---
a/framework/webtools/src/main/groovy/org/apache/ofbiz/webtools/entity/FindGeneric.groovy
+++
b/framework/webtools/src/main/groovy/org/apache/ofbiz/webtools/entity/FindGeneric.groovy
@@ -162,9 +162,9 @@ if (modelEntity) {
static Set<String> getFieldsToSelect(ModelEntity modelEntity) {
if (modelEntity instanceof ModelViewEntity) {
List groupByFields = modelEntity.getAliasesCopy()
- .find { it.getGroupBy() }*.getName()
+ .find { it.getGroupBy() }*.getName() ?: []
List functionFields = modelEntity.getAliasesCopy()
- .find { it.getFunction() }*.getName()
+ .find { it.getFunction() }*.getName() ?: []
return [*groupByFields, *functionFields] as Set
}
return [] as Set