loopbackio / loopback-next

LoopBack makes it easy to build modern API applications that require complex integrations.
https://loopback.io
Other
4.97k stars 1.07k forks source link

[@loopback/sequelize] Hidden properties configuration is not applied to nested model relations #10495

Open KalleV opened 6 months ago

KalleV commented 6 months ago

Describe the bug

When querying an entity with relations, the Model hiddenProperties is not respected for the relation entities 1 or more levels deep.

This line is converting the Sequelize models to Loopback models, but it's not applying it to the nested relations (besides referencesMany: https://github.com/loopbackio/loopback-next/blob/3f0869c9f3f6a11eb81c4a1d6ea055a7bbf77be7/extensions/sequelize/src/sequelize/sequelize.repository.base.ts#L1074-L1076

Relation types that are including hidden properties:

Logs

No response

Additional information

No response

Reproduction

N/A