I have some legacy data that I am trying to access in ofbiz.
<entity name="E1">
<field name="e1ID"/>
<field name="actualNetAmount"/>
<field name="estimatedNetAmount"/>
</entity>
Conceptually, I want to filter as shown here:
SELECT e1Id, actualNetAmount, estimatedNetAmount
FROM E1 WHERE actualNetAmount > estimatedNetAmount
<entity-condition entity="E1">
<condition-expr field="actualNetAmount" operator="greater"
value="${this.estimatedNetAmount}"/>
</entity-condition>
How can I achieve the equivalent of "this" is a entity condition expression?
I do not want to filter by iterating the list as the data volumes are huge.
One option I am thinking of is to create a SQL view and use that to filter
the data:
SELECT
e1Id, actualNetAmount, estimatedNetAmount,
CASE
WHEN actualNetAmount > estimatedNetAmount THEN 1
ELSE 0
END CASE AS actualGTEstimated
FROM E1
Maybe I could use DynamicViewEntities, but I was trying to use less
beanshell/java and more minilang.
Many thanks in advance, Chris
--
View this message in context:
http://www.nabble.com/entity-condition-expression-problem-tp25010865p25010865.html
Sent from the OFBiz - User mailing list archive at Nabble.com.