Applying Unposted Changes to Entity Rows Queried from the Database

When you call entity object association accessor methods, like getEmployees() on a DepartmentImpl class representing department 20, you get back a RowIterator over a set of related EmployeeImpl objects for the employees in that department. This entity rowset of appropriate employee entity instances associated to the department 20 is produced by querying the database, so existing employees assigned to department 20 will always show up in the associated entity rowset.

During the current session new Employee entities may be created and existing Employee entities may be modified. By default, unless these new and modified Employee entities are posted or committed, they would not appear in the entity rowset returned by a subsequent call to getEmployees() on the same Department entity later in the session. If you want the Business Components for Java framework to perform the extra bookkeeping necessary to provide a cache-consistent entity rowset including any appropriate new and modified entities (in addition to the existing queried entities already reflected in the database) you need to run in full EntityRowSet consistency mode.

There are two approaches to accomplish this:

on just that rowset.