Friday Aug 24, 2012

In-Memory Filtering and RowMatch

Assumption

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.

Observation


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.

Solution

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

Relevant Links.
http://docs.oracle.com/cd/E21043_01/web.1111/b31974/bcadvvo.htm#BCGHDDAD

https://blogs.oracle.com/workingwithadf/entry/little_mysterious_rowmatch


About

ADF Tips and Tricks

Search

Categories
Archives
« August 2012 »
SunMonTueWedThuFriSat
   
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
25
26
27
28
29
30
31
 
       
Today