-
-
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
I noticed that timestamps are not passed to the instance when using limit within include (version 3.12.2, postgres).
Example that reproduces the issue:
var Parent = sequelize.define('parent');
var Child = sequelize.define('child');
Parent.hasMany(Child);
//Sync etc.
Parent.create({
children: [{
id: 1
}],
}, {
include: [Child]
}).then(function(parent) {
Parent.findAll({
limit: 5,
include: [{
model: Child,
limit: 5 //Removing limit brings 'created_at' back
}]
}).then(function(parents) {
console.log(parents[0].children[0].created_at); //this is undefined when limit is specified
});
});Anything I'm doing wrong here?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
type: bugDEPRECATED: replace with the "bug" issue typeDEPRECATED: replace with the "bug" issue type