Hide fields from nested objects

Hi,

How can I hide fields from nested objects? I am able to do for the current object with setProps, however this does not work for nested fields.

Thanks

Hi Frank,

If I understood you correctly, “nested fields” are the related objects loaded through either auto-load or single-step relation retrieval. If that’s the case, there’s no way to restrict the response to contain only specific properties of the related objects.

Regards,
Mark

Hi Mark,

Thanks for the response, yes that is what I meant. The case is that I have the Users table as related objects and I want to show the username in a leaderboard. My concern is that the whole user object, including email and other fields, are send back. And with an app like Packet Capture someone could catch all this. Creating a new table with only non sensitive user information the ‘best’ option or do you know another way?

How would someone catch what you send if the traffic is encrypted with SSL?

Hi Mark,

Besides from the fact that I rather only send the required data back and not extra. Just by using SSL does not mean youre all good. As said before, run an app like package capture (https://play.google.com/store/apps/details?id=app.greyshirts.sslcapture&hl=en) and you’ll see you can read all the ‘encrypted’ messages.

Adding the feature to hide nested fields might be good.

Hi Frank, that app shows only http headers, but does not show any payload (which is where the responses are).

In any case, if you’d like to load only specific fields, then you need to load objects only by sending requests to the table containing them. That means related objects should be loaded as primary ones. For example, say you have table Person with related table Addresses. If you send a request to Person and retrieve related Address objects through autoload or single/two-step retrieval, then all properties of Address will be returned. However, if you send request to Address to load objects related to a specific parent (Person that is), then you can control which properties are returned.

Regards,
Mark