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

Model.get() doesn't auto-fetch related models #277

Closed
dirkmc opened this issue Aug 2, 2013 · 2 comments
Closed

Model.get() doesn't auto-fetch related models #277

dirkmc opened this issue Aug 2, 2013 · 2 comments

Comments

@dirkmc
Copy link

dirkmc commented Aug 2, 2013

eg

    db.User.get(3, function(err, user) {
        console.log(user.channels); // undefined
    });

    db.User.find({ id: 3 }, function(err, users) {
        console.log(users[0].channels); // Array
    });
@dresende
Copy link
Owner

dresende commented Aug 2, 2013

Please try the latest commit.

npm install dresende/node-orm2

@dirkmc
Copy link
Author

dirkmc commented Aug 2, 2013

It works, thanks!

@dirkmc dirkmc closed this as completed Aug 2, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants