Skip to content
This repository has been archived by the owner on Nov 9, 2024. It is now read-only.

this.id or this._id are undefined #22

Open
3rand opened this issue Nov 23, 2020 · 0 comments
Open

this.id or this._id are undefined #22

3rand opened this issue Nov 23, 2020 · 0 comments

Comments

@3rand
Copy link

3rand commented Nov 23, 2020

Trying to count objects from other collection which have a reference to the original object (similar to example given where parent: this.id)
This.id is undefined:

ParentSchema.fill('childCount', (callback) => { console.log(this.id); Child.count({ parent: this.id }).exec(callback); });

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant