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

Failing spec for embedded many with BSON Object Id #3563

Closed
wants to merge 1 commit into from

Conversation

pmlarocque
Copy link

Hello,

Here a failing spec for the deletion of embedded documents.
Related to #3025 and #3085.

Seem like you do not have the issue in your existing specs because the Address Id is the street not a BON::ObjectId.

As commented in the code, with 1 address it work, with 2 addresses the

person.addresses.each { |a| a.destroy }

delete 1 out of 2 others are green.

With 3 addresses all fails.

What I found out is with more embedded the .each number of fail is consistent while other varies.

Feel free to comment so I can help

pmlarocque

@fbernier
Copy link
Contributor

I have bisected Moped in a fresh Rails4/Mongoid app and the bad commit fell right on the switch to the 10gen(mongodb) BSON gem: mongoid/moped@b64f937

We also noticed that when the situation where some documents are not deleted occurs, the query is not being sent to mongodb.

@fbernier
Copy link
Contributor

Fixed in mongodb/bson-ruby#16. I wish this is going to be merged soon since it's quite a big issue.

@durran
Copy link
Member

durran commented Apr 3, 2014

Fixed in bson 2.2.2.

@durran durran closed this Apr 3, 2014
@durran durran added the fixed label May 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants