Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

"Undefined index: result" - When calling Model aggregation methods #44

Copy link
Copy link
Closed
@jmshelby

Description

@jmshelby
Issue body actions

When I try to call any of the Model's aggregate functions (static calls to count, min, max, sum ...) I get this error message from the Builder.

image

In this example I have a simple class called Characters extending your base model, and its empty (no specialization code). Here is the logged output of the results array from the call to collection->aggregate()

(
    [errmsg] => no such cmd: aggregate
    [bad cmd] => Array
        (
            [aggregate] => characters
            [pipeline] => Array
                (
                    [0] => Array
                        (
                            [$group] => Array
                                (
                                    [_id] => 
                                    [*] => Array
                                        (
                                            [$sum] => 1
                                        )

                                )

                        )

                )

        )

    [ok] => 0
)

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

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.