Skip to content

Fixed: EntityExpr no longer hardcodes the "default" delegator when validating condition types (OFBIZ-5100)#1420

Merged
mridulpathak merged 1 commit into
apache:release24.09from
mridulpathak:OFBIZ-5100-release24.09
Jul 24, 2026
Merged

Fixed: EntityExpr no longer hardcodes the "default" delegator when validating condition types (OFBIZ-5100)#1420
mridulpathak merged 1 commit into
apache:release24.09from
mridulpathak:OFBIZ-5100-release24.09

Conversation

@mridulpathak

Copy link
Copy Markdown
Contributor

Fixed: EntityExpr no longer hardcodes the "default" delegator when validating condition types
(OFBIZ-5100)

EntityExpr.checkRhsType() always resolved DelegatorFactory.getDelegator("default") instead of using the delegator actually running the query, so any setup using a non-"default"-named delegator could throw GenericEntityException when building a WHERE clause. The real delegator was already available at every call site in GenericDAO; it just wasn't being passed down.

Threads the real Delegator through EntityCondition.makeWhereString(...) as a new backward-compatible default method, and forwards it through every condition type that wraps or combines other conditions (EntityConditionList, EntityFieldMap, EntityNotCondition, EntityConditionBuilder) down to EntityExpr.checkRhsType(), which now skips RHS type validation instead of guessing at "default" when no delegator is available.

Thanks: Tarun Kumar for reporting the issue.

…lidating condition types (OFBIZ-5100)

EntityExpr.checkRhsType() always resolved DelegatorFactory.getDelegator("default")
instead of using the delegator actually running the query, so any setup using a
non-"default"-named delegator could throw GenericEntityException when building a
WHERE clause. The real delegator was already available at every call site in
GenericDAO; it just wasn't being passed down.

Threads the real Delegator through EntityCondition.makeWhereString(...) as a new
backward-compatible default method, and forwards it through every condition type
that wraps or combines other conditions (EntityConditionList, EntityFieldMap,
EntityNotCondition, EntityConditionBuilder) down to EntityExpr.checkRhsType(),
which now skips RHS type validation instead of guessing at "default" when no
delegator is available.
@mridulpathak
mridulpathak merged commit fc702a5 into apache:release24.09 Jul 24, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants