By animesh.prasad on Aug 24, 2012
We have a view object named ExampleVO which is based on entity object ExampleEO, and this VO has an attribute called ExampleFlag. ExampleVO has a clause in the base query that only allows rows that match the criteria ExampleEO.ExampleFlag = ‘Y’. We have another view object named CreateExampleVO that is used to add new rows to the ExampleEO. Both these view objects have view link consistency enabled.
Now if we insert a row into CreateExampleVO with the value of ExampleFlag as ‘N’ one would expect that this row will not be included in the ExampleVO. This is not the behavior that is observed. We now have a row in the ExampleVO that does not match the clause. If view link consistency is enabled, any new row created by any view object based on the same entity is added (regardless of the query) to the row set of all VO’s based on that EO.
If the view object has a design-time WHERE clause like ExampleEO.ExampleFlag = ‘Y’, you can apply a RowMatch object to your view object to perform the same filtering in-memory.
The filtering expression of the RowMatch object you specify prevents new rows that don’t match the condition from being added.
You can add a RowMatch to the view object by creating the same clause in a view criteria and applying it. The mode for said view criteria should be set to ‘In-memory’.
Note: You don’t have to remove the where clause from the query