-
Notifications
You must be signed in to change notification settings - Fork 48
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
Virtual attribute breakage with Objection 1.6.4+ #45
Comments
@Aerlin Did you try with Objection.js latest version 1.6.6? |
Yeah. I double checked now and 1.6.6 is affected. Example of my setup
In [email protected], the query results contain the created_ago, updated_ago and html fields. In 1.6.4, 1.6.5 & 1.6.6 the fields are missing. I know this isn't Feathers-Objection's fault. Just wanted to let you know the issue was affecting F-O. Although I'm starting to wonder if I broke something as nobody else seems to be reporting the issue on the Objection issues list. 😕 edit: Version info edit2: I think this guy's experiencing a similar problem affecting Koa. |
Objection's Model virtuals parameter used to default to true, now defaults to false. Vincit/objection.js@5530377#diff-008bf8359e2b2c171c571598395ecfb7L22 Vincit/objection.js@8115f0b#diff-008bf8359e2b2c171c571598395ecfb7R52 If Objection/lib/model/modelToJson.js getVirtuals() is set to default to true, the missing virtual attributes return.
I 'm not sure if the change was intended and F-O needs to implicitly requests virtuals somewhere now, or if it's a bug that they can fix. |
This is a bug in objection. Sorry about this. I'm releasing 1.6.7 right now with a fix. |
objection 1.6.7 is now released. |
Virtual attributes aren't being added to results after updating Objection to 1.6.4+. I think this issue is related.
For example, trying to stringify Objection's results won't include virtual attributes.
I think Feathers-Objection is affected by this. Unsure if it's something F-O can fix or if it needs to be fixed on Objection's end. But reverting to [email protected] works for now.
The text was updated successfully, but these errors were encountered: