Skip to content

get() by id does not work #4

@truemetal

Description

@truemetal

This code returns no rows:

let res = Collection()
try? res.get("58d29558a54d7552e223dae3")
let rows = res.rows()

Doing same in robomongo returns correct object:

db.getCollection('collections').find({` _id : ObjectId("58d29558a54d7552e223dae3") })

Working it around like so for now:

let bs = BSON()
bs.append(oid: BSON.OID(id))
guard let cursor = collection.find(query: bs) else { return }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions