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

How to retrieve values returned by a task.update() ? #79

Open
J-DreaMy opened this issue Nov 12, 2019 · 1 comment
Open

How to retrieve values returned by a task.update() ? #79

J-DreaMy opened this issue Nov 12, 2019 · 1 comment

Comments

@J-DreaMy
Copy link

J-DreaMy commented Nov 12, 2019

task.update(House, { _id: id }, { latitude, longitude }, { new: true });
task.update(UserHouse, { _id: userHouse.id }, { houseName }, { new: true });
const results = await task.run({ useMongoose: true });
return { house: results[0], userHouse: results[1] };

it will return me like this

        "house": {
            "n": 0,
            "nModified": 0,
            "ok": 1
        },
        "userHouse": {
            "n": 1,
            "nModified": 1,
            "ok": 1
        }
@pavelsust
Copy link

I am also facing this issue. After update i don't get latest data which is important

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

No branches or pull requests

2 participants