get method passing without any problem
This commit is contained in:
@@ -66,11 +66,11 @@ pub async fn get_table_data(
|
||||
.await
|
||||
.map_err(|e| Status::internal(format!("Foreign key lookup error: {}", e)))?;
|
||||
|
||||
// 2. Build the list of foreign key column names
|
||||
// 2. Build the list of foreign key column names using full table names
|
||||
let mut foreign_key_columns = Vec::new();
|
||||
for fk in fk_columns_query {
|
||||
let base_name = fk.table_name.split_once('_').map_or(fk.table_name.as_str(), |(_, rest)| rest);
|
||||
foreign_key_columns.push(format!("{}_id", base_name));
|
||||
// Use the full table name, not a stripped version
|
||||
foreign_key_columns.push(format!("{}_id", fk.table_name));
|
||||
}
|
||||
|
||||
// 3. Prepare a complete list of all columns to select
|
||||
|
||||
Reference in New Issue
Block a user