Hi Patrick
From memory, a view entity will only be modifiable if the primary keys for all included entities are present.
As a best practice, you should generally only perform write/update/delete operations on entities via the services available, doing so will ensure that all related SECAs are run.
Regards
Scott
HotWax Media
http://www.hotwaxmedia.comOn 18/02/2010, at 8:51 AM, Patrick wrote:
> What's the appropriate way to modify a viewEntity? I have a
> viewEntity, FacilityAndContactMechAndAddress, and it has 3 primary
> keys, but they don't seem to work as expected. I tried the code
> below, but it says bad primary key. Am I taking the wrong approach?
> Also do you think I should do this at the java service level or the
> simple-method level?
>
> <!-- this didn't quite work, bad primary key (but this works if I
> change entity-name to Facility for facility fields) -->
> <set field="lookupPKMap.facilityId" from-field="parameters.facilityId"/>
> <find-by-primary-key entity-name="FacilityAndContactMechAndAddress"
> map="lookupPKMap" value-field="facilityId"/>
> <set-nonpk-fields map="parameters" value-field="facilityId"/>
> <store-value value-field="facilityId"/>
>
> Thanks
> Patrick