We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
.loadMany()
This issue happens when an object has an array of references and there are multiple references to the same object in the array.
In the code below, we give the user two references to the same Eye, but when we load the user there is only one reference there.
class Eye extends Document { constructor() { super('eyes'); this.color = String; } } class User extends Document { constructor() { super('users'); this.eyes = [Eye]; } } var user = User.create(); var eye = Eye.create({color: 'blue'}); eye.save().then(function(e) { user.eyes.push(eye, eye); return user.save(); }).then(function(u) { return User.loadMany({}); }).then(function(users) { expect(users[0].eyes).to.have.length(2); // FAILS });
The text was updated successfully, but these errors were encountered:
Fixed issues #4 and #5.
a52ffdf
No branches or pull requests
This issue happens when an object has an array of references and there are multiple references to the same object in the array.
In the code below, we give the user two references to the same Eye, but when we load the user there is only one reference there.
The text was updated successfully, but these errors were encountered: