forked from alemi/upub
fix: try to remove duplicates with group-by
This commit is contained in:
parent
aa953a71f8
commit
2d6ab97820
1 changed files with 2 additions and 0 deletions
|
@ -17,6 +17,7 @@ impl Query {
|
|||
.add(model::activity::Column::Id.is_not_null())
|
||||
.add(model::object::Column::Id.is_not_null())
|
||||
)
|
||||
.group_by(model::activity::Column::Internal)
|
||||
.order_by(model::addressing::Column::Published, Order::Desc)
|
||||
.select_only();
|
||||
|
||||
|
@ -45,6 +46,7 @@ impl Query {
|
|||
let mut select = model::addressing::Entity::find()
|
||||
// .distinct()
|
||||
.join(sea_orm::JoinType::InnerJoin, model::addressing::Relation::Objects.def())
|
||||
.group_by(model::object::Column::Internal)
|
||||
.order_by(model::addressing::Column::Published, Order::Desc)
|
||||
.select_only();
|
||||
|
||||
|
|
Loading…
Reference in a new issue