forked from alemi/upub
fix: don't rename columns while joining
This commit is contained in:
parent
629990fee8
commit
4883597ee3
1 changed files with 4 additions and 4 deletions
|
@ -92,11 +92,11 @@ impl Entity {
|
||||||
.join(sea_orm::JoinType::LeftJoin, crate::model::activity::Relation::Object.def());
|
.join(sea_orm::JoinType::LeftJoin, crate::model::activity::Relation::Object.def());
|
||||||
|
|
||||||
for col in crate::model::activity::Column::iter() {
|
for col in crate::model::activity::Column::iter() {
|
||||||
select = select.select_column_as(col, format!("{}{}", crate::model::activity::Entity.table_name(), col.to_string()));
|
select = select.select_column(col);
|
||||||
}
|
}
|
||||||
|
|
||||||
for col in crate::model::object::Column::iter() {
|
for col in crate::model::object::Column::iter() {
|
||||||
select = select.select_column_as(col, format!("{}{}", crate::model::object::Entity.table_name(), col.to_string()));
|
select = select.select_column(col);
|
||||||
}
|
}
|
||||||
|
|
||||||
select
|
select
|
||||||
|
@ -107,11 +107,11 @@ impl Entity {
|
||||||
.distinct()
|
.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 object anymore
|
||||||
// TODO we could in theory return just the link or fetch them again, just ignoring them is mehh
|
// TODO we could in theory return just the link or fetch them again, just ignoring them is mehh
|
||||||
|
|
||||||
for col in crate::model::object::Column::iter() {
|
for col in crate::model::object::Column::iter() {
|
||||||
select = select.select_column_as(col, format!("{}{}", crate::model::object::Entity.table_name(), col.to_string()));
|
select = select.select_column(col);
|
||||||
}
|
}
|
||||||
|
|
||||||
select
|
select
|
||||||
|
|
Loading…
Reference in a new issue