This is an automated email from the ASF dual-hosted git repository.

mleila 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 8aa27e3b4d Fixed: Error when calling EntityQuery.from() with a dve via 
groovy DSL (OFBIZ-13077)
8aa27e3b4d is described below

commit 8aa27e3b4d08c0471c201fc83fd494399b1586d7
Author: MLeila <mle...@apache.org>
AuthorDate: Mon May 13 18:06:42 2024 +0200

    Fixed: Error when calling EntityQuery.from() with a dve via groovy DSL 
(OFBIZ-13077)
    
    This add the Groovy DSL for EntityQuery.from(DynamicViewEntity dve)
---
 .../org/apache/ofbiz/service/engine/GroovyBaseScript.groovy      | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git 
a/framework/service/src/main/groovy/org/apache/ofbiz/service/engine/GroovyBaseScript.groovy
 
b/framework/service/src/main/groovy/org/apache/ofbiz/service/engine/GroovyBaseScript.groovy
index 5351b744bb..fa7c9bae5a 100644
--- 
a/framework/service/src/main/groovy/org/apache/ofbiz/service/engine/GroovyBaseScript.groovy
+++ 
b/framework/service/src/main/groovy/org/apache/ofbiz/service/engine/GroovyBaseScript.groovy
@@ -21,6 +21,7 @@ package org.apache.ofbiz.service.engine
 import org.apache.ofbiz.base.util.Debug
 import org.apache.ofbiz.base.util.UtilProperties
 import org.apache.ofbiz.entity.GenericValue
+import org.apache.ofbiz.entity.model.DynamicViewEntity
 import org.apache.ofbiz.entity.util.EntityQuery
 import org.apache.ofbiz.service.DispatchContext
 import org.apache.ofbiz.service.ExecutionServiceException
@@ -90,8 +91,12 @@ abstract class GroovyBaseScript extends Script {
         return binding.getVariable('delegator').makeValidValue(entityName, 
inputMap)
     }
 
-    EntityQuery from(String entity) {
-        return EntityQuery.use(binding.getVariable('delegator')).from(entity)
+    EntityQuery from(String entityName) {
+        return 
EntityQuery.use(binding.getVariable('delegator')).from(entityName)
+    }
+
+    EntityQuery from(DynamicViewEntity dynamicViewEntity) {
+        return 
EntityQuery.use(binding.getVariable('delegator')).from(dynamicViewEntity)
     }
 
     EntityQuery select(String... fields) {

Reply via email to