Skip to content

::all() returns "_id":{"$id":"51c33c7e537e07abac000004"} #2

Closed
@mrusme

Description

@mrusme

Hi,

since the last composer update, the ::all() method seems to return a broken _id. Here's an example code:

public function index()
{
$threads = Thread::all();

return Response::json($threads);
}

The code is resulting in this:

[{"_id":{"$id":"51c33c7e537e07abac000004"},"updated_at":{"sec":1371749502,"usec":0},"created_at":{"sec":1371749502,"usec":0}}]

It appears to have something to do with how the actual _id from the MongoDB is being processed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions