From 54b619dffcfa7fc28fae6501cef3098e7d0b0823 Mon Sep 17 00:00:00 2001 From: alemi Date: Tue, 25 Jun 2024 04:19:53 +0200 Subject: [PATCH] fix: related query also brings up relation as a treat --- upub/core/src/selector/query.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/upub/core/src/selector/query.rs b/upub/core/src/selector/query.rs index feb12540..cdcaba17 100644 --- a/upub/core/src/selector/query.rs +++ b/upub/core/src/selector/query.rs @@ -97,6 +97,10 @@ impl Query { .filter(condition) .select_only(); + for column in model::relation::Column::iter() { + select = select.select_column_as(column, format!("{}{}", model::relation::Entity.table_name(), column.to_string())); + } + for column in model::actor::Column::iter() { select = select.select_column_as(column, format!("{}{}", model::actor::Entity.table_name(), column.to_string())); }