In order to use findByKey() on a view object with no entity object usage backing it, you need to do two steps:
- Set one or more attributes in your view object as being a "Key Attribute"
- Overriding the create() method in your view object impl class, to enable view-object-level key management:
public create() { setManageRowsByKey(true); }
Why do you have to programmatically enable this feature? It adds a little overhead to manage the keys at the view object level, so we figured doing it explicitly was the right thing to do.
12:06:47 AM
|
|