-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Closed
Labels
type: bugDEPRECATED: replace with the "bug" issue typeDEPRECATED: replace with the "bug" issue type
Description
What you are doing?
const scopes = {
public: {
attributes: {
exclude: ['secret']
}
}
}
// imagine i made a model named User with two fields:
// - secret
// - name
User.belongsTo(City) // user now has cityId field
User.scope('public').findById(123).then((user) =>
// user === { id: 123, name: 'Bob' }
)What do you expect to happen?
The foreign key cityId should exist on the result
What is actually happening?
The foreign key cityId does not exist on the result
When not using scopes, cityId appears in the result as expected.
Dialect: postgres
Sequelize version: 3.23.4
tonivj5, rafaelparpinelcavina, MH3009, TheophileMorin, leosayous21 and 3 more
Metadata
Metadata
Assignees
Labels
type: bugDEPRECATED: replace with the "bug" issue typeDEPRECATED: replace with the "bug" issue type