loopback-next icon indicating copy to clipboard operation
loopback-next copied to clipboard

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

Open KalleV opened this issue 9 months ago • 0 comments

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:

  • belongsTo
  • hasMany
  • hasManyThrough

Logs

No response

Additional information

No response

Reproduction

N/A

KalleV avatar May 03 '24 18:05 KalleV