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

dao.get({ plain: true }) doesn't work for reloaded objects #4844

garrett-gottlieb opened this Issue Nov 12, 2015 · 1 comment


2 participants

garrett-gottlieb commented Nov 12, 2015

Consider the following example:

var user = yield User.create({ settingsId })
yield user.reload({ include: settingsAssociation })

_.isPlainObject(user.get({ plain: true }).settings) // false

It works when the dao is retrieved using querying, just not when reloaded with include.


This comment has been minimized.


mickhansen commented Nov 12, 2015

reload does not update the internal options of the instance (which contains what includes to iterate while doing a get).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment