I had assumed that the Sails model schema: true
config option worked in two directions; i.e. that it 1. would strip out extra fields not defined in the attributes
hash before writing to the database, and 2. strip out any extra fields in the database before serving it back to the application (in cases where the database has extra data that we don't need to get.
It looks like it only does 1, and not 2. Is this correct? If so, is there another more elegant built in way to do 2 rather than overwriting the toJSON() method to only return the fields we want?