Skip to content

Commit

Permalink
Fixed: Error when calling EntityQuery.from() with a dve via groovy DS…
Browse files Browse the repository at this point in the history
…L (OFBIZ-13077)

This add the Groovy DSL for EntityQuery.from(DynamicViewEntity dve)
  • Loading branch information
MkLeila authored May 13, 2024
1 parent 85987ff commit 8aa27e3
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 8aa27e3

Please sign in to comment.