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

Renaming a field does not work correctly with observe using projection #3571

Closed
mitar opened this Issue Jan 28, 2015 · 7 comments

Comments

Projects
None yet
3 participants
@mitar
Collaborator

mitar commented Jan 28, 2015

If I have an observe collection.find({}, fields: 'type.name': 1).observe and I rename type field to typex, changed callback is not triggered. I would assume type: undefined will be called, because from the view of the projection field type has been removed.

Reproduction is here: http://meteorpad.com/pad/uk6HCTtJt3gxHCFm6/observebug

(It does "not work" equally on Minimongo and MongoDB.)

@stubailo

This comment has been minimized.

Contributor

stubailo commented Jan 28, 2015

Please provide a full reproduction as described in: https://github.com/meteor/meteor/wiki/Contributing-to-Meteor#reporting-a-bug-in-meteor Without a way to replicate your problem, we can't debug and fix it.

@stubailo stubailo closed this Jan 28, 2015

@mitar

This comment has been minimized.

Collaborator

mitar commented Jan 28, 2015

I linked it above??? That is a reproduction? You have also a "download" button if you want to get your local version of the app?

@stubailo

This comment has been minimized.

Contributor

stubailo commented Jan 28, 2015

Sorry, my mistake - I didn't see the link somehow.

@stubailo stubailo reopened this Jan 28, 2015

@mitar

This comment has been minimized.

Collaborator

mitar commented Jan 28, 2015

Correction: It does work equally on Minimongo and MongoDB, in a sense that it does "not work" equally. :-)

@glasser glasser added this to the Winter 2015 Mongo Maintenance milestone Feb 3, 2015

glasser added a commit that referenced this issue Mar 6, 2015

Failing test for #3571
This fails on both server and client.

This is also related to #2254.

glasser added a commit that referenced this issue Mar 6, 2015

@glasser glasser closed this in cb7664c Mar 6, 2015

@glasser

This comment has been minimized.

Member

glasser commented Mar 6, 2015

Turned out this was related to #2254. Fixed!

@mitar

This comment has been minimized.

Collaborator

mitar commented Mar 6, 2015

For me it didn't work with MongoDB as well. Is that fixed, too?

@glasser

This comment has been minimized.

Member

glasser commented Mar 6, 2015

Yes, the same bad logic was used in OplogObserveDriver. 3674c12

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