[
https://issues.apache.org/jira/browse/OFBIZ-5377?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13809426#comment-13809426
]
Christian Carlow commented on OFBIZ-5377:
-----------------------------------------
Allowing EntityCondition to be associated with a DynamicViewEntity memeber
without executing the query such as what is done when
findListIteratorByCondition is called seems like the best way. Having some
method such as addMemberEntityCondition to apply a condition to the member
entity prior to the query being executed could accomplish this.
Adding an attribute such as "use-parameter" to a condition-expr element in
entitymodel definitions is another possibility. Code would need to account for
the "use-parameter" attribute and allow the parameter to be supplied as the
value to the entity condition field.
The first solution seems easier than the latter.
> Add ability to join entitites with parameterized conditions to other entities
> -----------------------------------------------------------------------------
>
> Key: OFBIZ-5377
> URL: https://issues.apache.org/jira/browse/OFBIZ-5377
> Project: OFBiz
> Issue Type: Improvement
> Reporter: Christian Carlow
>
> OFBiz should be improved to allow entities with parameterized conditions to
> be joined with other entities.
> I need to be able to apply a condition to the OrderShipment entity where
> OrderShipment.shipmentId = parameters.shipmentId which might produce this
> query:
> SELECT * ORDER_SHIPMENT WHERE SHIPMENT_ID = '10000';
> Then I need to be able to take that query and join it to the
> OrderItemShipGroupAssoc entity to product a query such as this:
> SELECT * FROM ORDER_ITEM_SHIP_GROUP_ASSOC OISGA LEFT JOIN (SELECT * FROM
> ORDER_SHIPMENT WHERE SHIPMENT_ID = '10000') OS ON OISGA.ORDER_ID =
> OS.ORDER_ID AND OISGA.ORDER_ITEM_SEQ_ID = OS.ORDER_ITEM_SEQ_ID AND
> OISGA.SHIP_GROUP_SEQ_ID = OS.SHIP_GROUP_SEQ_ID
--
This message was sent by Atlassian JIRA
(v6.1#6144)