Hi 

I am just starting my first ERRest app and playing with ERXKeyFilters.

I have an OrganisationController using a filter and I remove unwanted 
attributes from the rest response with:

ERXKeyFilter filter = ERXKeyFilter.filterWithAttributes();
filter.exclude("dateTimeStamp","autoNotify","notifyMethod","webSitePassword","website");

This works great, however if I then have a TransactionController and a 
Transaction object that has a to-1 Organisation relationship how best do I also 
remove the unwanted Organisation attributes from the rest response? At the 
moment I have the below:

ERXKeyFilter filter = ERXKeyFilter.filterWithAttributes();
filter.include("organisation").includeAttributes();
filter.exclude("organisation.dateTimeStamp","organisation.autoNotify","organisation.notifyMethod","organisation.webSitePassword","organisation.website");


but I can't help thinking there is a better way to ensure consistency about 
what attributes are contained in the response for various EOs when they form 
parts of responses that contain relationship objects.  Is there a better way of 
achieving this?

Thanks

Giles
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to