|
|
Hi,
I'm trying to filter an entity list where two of the entity fields do not equal one another.
I realize I can retrieve the list and while looping the results compare the fields manually in code, but it would be better if I could apply the condition in the SQL statement itself.
I've looked into the entity-condition and condition-expr but they seem to require a value to be somewhat statically specified. This seems to be the case for the EntityCondition.makeCondition method for the findList method as well.
My question is, if I want to get a list of all inventoryItem records where the availableToPromise is not equal to the accountingQuantityTotal for example, how might I do so?
Basically I'm trying to get the SQL WHERE CLAUSE to be WHERE inventory_item.available_to_promise != inventory_item.accounting_quantity_total. Is this possible using the entity engine?
|