forked from alemi/upub
fix: attempt to select only one addressing
This commit is contained in:
parent
c28b5fd49c
commit
d5a83a5c7c
1 changed files with 2 additions and 0 deletions
|
@ -85,6 +85,7 @@ impl FromQueryResult for EmbeddedActivity {
|
||||||
impl Entity {
|
impl Entity {
|
||||||
pub fn find_activities() -> Select<Entity> {
|
pub fn find_activities() -> Select<Entity> {
|
||||||
let mut select = Entity::find()
|
let mut select = Entity::find()
|
||||||
|
.distinct()
|
||||||
.select_only()
|
.select_only()
|
||||||
.join(sea_orm::JoinType::InnerJoin, Relation::Activity.def())
|
.join(sea_orm::JoinType::InnerJoin, Relation::Activity.def())
|
||||||
// INNERJOIN: filter out addressings for which we don't have an activity anymore
|
// INNERJOIN: filter out addressings for which we don't have an activity anymore
|
||||||
|
@ -104,6 +105,7 @@ impl Entity {
|
||||||
|
|
||||||
pub fn find_objects() -> Select<Entity> {
|
pub fn find_objects() -> Select<Entity> {
|
||||||
let mut select = Entity::find()
|
let mut select = Entity::find()
|
||||||
|
.distinct()
|
||||||
.select_only()
|
.select_only()
|
||||||
.join(sea_orm::JoinType::InnerJoin, Relation::Object.def());
|
.join(sea_orm::JoinType::InnerJoin, Relation::Object.def());
|
||||||
// INNERJOIN: filter out addressings for which we don't have an activity anymore
|
// INNERJOIN: filter out addressings for which we don't have an activity anymore
|
||||||
|
|
Loading…
Reference in a new issue