Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
KalleV opened this issue May 3, 2024 · 0 comments
Labels

Comments

@KalleV
Copy link
Contributor

KalleV commented May 3, 2024

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:

let parentEntityInstances = parentEntities.map(
sequelizeModel => new this.entityClass(sequelizeModel.toJSON()) as T,
);

Relation types that are including hidden properties:

  • belongsTo
  • hasMany
  • hasManyThrough

Logs

No response

Additional information

No response

Reproduction

N/A

@KalleV KalleV added the bug label May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant