fix: do i need to group by more?
This commit is contained in:
parent
2d6ab97820
commit
216c08c623
1 changed files with 3 additions and 0 deletions
|
@ -18,6 +18,8 @@ impl Query {
|
||||||
.add(model::object::Column::Id.is_not_null())
|
.add(model::object::Column::Id.is_not_null())
|
||||||
)
|
)
|
||||||
.group_by(model::activity::Column::Internal)
|
.group_by(model::activity::Column::Internal)
|
||||||
|
.group_by(model::object::Column::Internal)
|
||||||
|
.group_by(model::like::Column::Internal)
|
||||||
.order_by(model::addressing::Column::Published, Order::Desc)
|
.order_by(model::addressing::Column::Published, Order::Desc)
|
||||||
.select_only();
|
.select_only();
|
||||||
|
|
||||||
|
@ -47,6 +49,7 @@ impl Query {
|
||||||
// .distinct()
|
// .distinct()
|
||||||
.join(sea_orm::JoinType::InnerJoin, model::addressing::Relation::Objects.def())
|
.join(sea_orm::JoinType::InnerJoin, model::addressing::Relation::Objects.def())
|
||||||
.group_by(model::object::Column::Internal)
|
.group_by(model::object::Column::Internal)
|
||||||
|
.group_by(model::like::Column::Internal)
|
||||||
.order_by(model::addressing::Column::Published, Order::Desc)
|
.order_by(model::addressing::Column::Published, Order::Desc)
|
||||||
.select_only();
|
.select_only();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue