From 4883597ee3e0a2e8f621cfdc3798d1864b460b8d Mon Sep 17 00:00:00 2001 From: alemi Date: Fri, 19 Apr 2024 05:02:59 +0200 Subject: [PATCH] fix: don't rename columns while joining --- src/model/addressing.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/model/addressing.rs b/src/model/addressing.rs index 41c6948f..513b8e8e 100644 --- a/src/model/addressing.rs +++ b/src/model/addressing.rs @@ -92,11 +92,11 @@ impl Entity { .join(sea_orm::JoinType::LeftJoin, crate::model::activity::Relation::Object.def()); 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() { - select = select.select_column_as(col, format!("{}{}", crate::model::object::Entity.table_name(), col.to_string())); + select = select.select_column(col); } select @@ -107,11 +107,11 @@ impl Entity { .distinct() .select_only() .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 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