When to Associate View Objects with Entity Objects

Generally, you want View Objects associated to Entity Objects. This allows the rowsets to support updates, inserts, deletes with automatic triggering of business logic in the underlying, related Entity Objects. Updates made through any View Object in your session automatically show up in other View Objects displaying the same logical Entity Object attributes. This behavior is only possible when the View Object and Entity Object are related.

An exception to this rule occurs if your view only queries data and never inserts, updates, or deletes. In this case, your View Object should not be related to Entity Objects since this may not add useful functionality.

Under certain circumstances you can use ForwardOnly mode for your View Object to save memory and time by not caching any row data (vo.setForwardOnly(true));. For example, use ForwardOnly mode:

However, it is important to associate your View Object to an Entity Object: