Fixed: Error when calling EntityQuery.from() with a dve via groovy DSL (OFBIZ-13077)
This add the Groovy DSL for EntityQuery.from(DynamicViewEntity dve)
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 5351b74..fa7c9ba 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 @@
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 @@
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) {