Friday, August 14, 2009

Range Paging in Master Detail bug. (Fixed in

When i thried to set Range Paging in some view objects in our application i had the following exception:

oracle.jbo.InvalidOperException: JBO-25011: Rowset Employees_Departments1_EmpDeptFkLink_DepartmentsView_0 is forward only. at oracle.jbo.server.ViewObjectImpl.validateRangeSizeForRangePaging( at oracle.jbo.server.ViewRowSetIteratorImpl.setRangeSize( at oracle.jbo.server.ViewRowSetImpl.setRangeSize( at oracle.jbo.server.ViewObjectImpl.doCreateViewLinkAccessorRS( at oracle.jbo.server.ViewObjectImpl.createViewLinkAccessorRS( at oracle.jbo.server.AssociationDefImpl.get( at oracle.jbo.server.ViewAttributeDefImpl.get( at oracle.jbo.server.ViewRowStorage.getViewLinkAccessorResult( at oracle.jbo.server.ViewRowStorage.getAttributeInternal( at oracle.jbo.server.ViewRowImpl.getAttributeValue( at oracle.jbo.server.ViewRowImpl.getAttributeInternal( at model.EmployeesViewRowImpl.getMasterDepartment(

This happens if you use a master Accessor in a detail view object.
So i reproduced in a simple test case:

I have a simple Departments Employees master detail relation.

In Employees view object i create a transient Attribute IsDepartmentManager that i want to check if the employee is the manager of the department.

To do that i need the department assecor in Employees. so i do that from the View link.

In the getter of transient attribute i get the attribute of master :
public Boolean getisDepartmentManager() {
Object depManager = this.getMasterDepartment().getAttribute("ManagerId");
return depManager != null && depManager.equals(this.getEmployeeId());

When i Run application, everything is working fine:

But if i set Range Paging on tuning of Departments View and run again :

Is this a bug?

Am i missing something?

Test case:


  1. Filed bug# 8807859 for tracking with your testcase, thanks. The workaround is to (a) set access mode to "Scrollable" on the DepartmentsView VO definition, and then to (b) edit the VO instance in the data model by selecting it in the "Data Model" panel and clicking (Edit) to set the access mode to "Range Paging" just on that particular VO instance used in the user interface.

  2. Nice post Mike! Once more you proved to be a Time Savior!