First, read the referenced comment in issue #102 to understand the request. Then, locate the handler code where .lean() is called, likely in the REST API generation logic. The change involves adding an option to disable .lean() via a parameter like { $lean: false }, modifying the relevant middleware or configuration.
Add option to disable call to .lean() in handlers · JKHeadley/rest-hapi#103 | Good First Issue