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

ERROR: column "?.id" must appear in the GROUP BY clause or be used in an aggregate function #116

Closed
max107 opened this issue Sep 15, 2015 · 0 comments
Assignees
Milestone

Comments

@max107
Copy link

max107 commented Sep 15, 2015

class User1 extends Model
{

}

class Issue extends Model
{
    public static function getFields()
    {
        return [
            'author' => [
                'class' => ForeignField::class,
                'modelClass' => User1::class
            ],
            'user' => [
                'class' => ForeignField::class,
                'modelClass' => User1::class
            ],
            'created_at' => [
                'class' => DateTimeField::class,
                'autoNowAdd' => true
            ]
        ];
    }
}

$qs = Issue::objects()->with(['user', 'author'])->order(['-created_at'])->asArray();
@max107 max107 added the Bug label Sep 15, 2015
@max107 max107 self-assigned this Sep 15, 2015
@max107 max107 added the pgsql label Sep 15, 2015
@max107 max107 closed this as completed in df1d2f1 Sep 15, 2015
@max107 max107 modified the milestone: 1.0 Jul 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant