Hi, everyone.
To write OnClause predicate expression should be written like this:
- Example: iEntityFieldA and iEntityFieldB are variables that store such as
- iEntityFieldA = OrdersField.CustomerId (CustomerId field from table Orders)
- iEntityFieldB = CustomersField.CustomerId (CustomerId field from table Customers)
- alias = simply put a name to identify
IPredicate onClause = new PredicateExpression();
onClause = iEntityFieldA.SetObjectAlias(alias).Equal(1);
or
onClause = iEntityFieldA.SetObjectAlias(alias).Equal(iEntityFieldB.SetObjectAlias(alias));
We all know that the above are accepted by LLBL PredicateExpression and it is also valid when writing this in SQL.
However, value to value comparison in OnClause is also valid statement in SQL like this statement below
SELECT * FROM Orders LEFT OUTER JOIN Customers ON 1 = 1;
The 1 = 1 in the onClause is a valid onClause statement, but the result will be somewhat silly since all return true. Despite this, user should be able to configure like this In C# but I don't seem to find any function from LLBL available.
Is there anything similar to a function so that I could achieve like how it is in SQL? Thank you very much, I appreciate kinds of replies.