Page Contents

Home > @loopback/sequelize > SequelizeCrudRepository > excludeHiddenProps

SequelizeCrudRepository.excludeHiddenProps() method

Warning: This API is now obsolete.

To exclude hidden props from an entity instance, call the .toJSON() method on it. Alternatively it can be use by manually instantiating the model using new EntityClass(data).toJSON().

This function will be removed in next major release.

Remove hidden properties specified in model from response body. (See: https://github.com/sourcefuse/loopback4-sequelize/issues/3)

Signature:

protected excludeHiddenProps(entity: T & Relations): T & Relations;

Parameters

Parameter Type Description
entity T & Relations normalized entity. You can use entity.toJSON()’s value

Returns:

T & Relations

normalized entity excluding the hiddenProperties