« JSF Version of JHeadstart Workshop in April and May | Main | Searching the Old JHeadstart Blog »

How to Apply VO Where Clause to New Rows

In this article I describe the solution we found for a problem with Subtype VO's. We had 2 ADF BC View Objects, each representing a different subtype of the database table without extending a supertype VO. The problem was: new rows appeared in the set of both View Objects, even though each new row clearly belonged to only one of the subtypes. The solution is to use the ADF BC RowMatch or RowQualifier to apply in-memory filtering.

If you read the example solution carefully, you will see that the RowMatch applied does not correspond completely to the where clause of that View Object. That is because expressions like "is null" or "is not null" cannot be used in RowMatches. The expression "is not null" can for Number attributes be replaced by something like "Attribute > 0", but I have not found a solution for "is null" yet. If you have a suggestion, please leave a Comment on this post!

Comments (1)

Maybe this problem can be solved by adding a transient attribute CommissionIsNull which returns "true" or "false", and then checking for CommissionIsNull = 'true'.

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)