Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

!e.eoo() error in MongoDB query

Tags:

json

mongodb

bson

Something is wrong with this query, and I can't tell what it is. I am sure it's something very simple:

db.foo.insert({
    'created at': new Date(),
    ooc: false,
    body: '<p>Moo</p>\n',
    keywords: [ 'Moo' ],
    mentioned: [],
    tags: [],
    sender: {
        _id: 'stuff',
        name: 'lambdadusk',
        'display name': 'Lambda'
    }
});

The error I get from Mongo is simply

!e.eoo()

I'm using MongoDB 2.0.5. Googling the error did not tell me much.

like image 871
Lanbo Avatar asked Nov 04 '22 23:11

Lanbo


1 Answers

I should have tried that earlier.

The problem is not the query, but the BSON datafile of the collection was corrupted somehow. I had to drop the collection, then re-try.

Luckily, the collection was empty as I am early in development.

like image 60
Lanbo Avatar answered Nov 15 '22 06:11

Lanbo