This commit is contained in:
Billy Chan 2024-05-03 13:46:38 +08:00
parent 8687407257
commit 33f4659db7
No known key found for this signature in database
GPG Key ID: 45461E52F22E0279
3 changed files with 5 additions and 3 deletions

View File

@ -154,7 +154,7 @@ impl EntityTransformer {
RelationType::HasMany RelationType::HasMany
}; };
rel.rel_type = rel_type; rel.rel_type = rel_type;
rel.ref_table = table_name.clone(); rel.ref_table = table_name.to_string();
rel.columns = Vec::new(); rel.columns = Vec::new();
rel.ref_columns = Vec::new(); rel.ref_columns = Vec::new();
if let Some(vec) = inverse_relations.get_mut(&ref_table) { if let Some(vec) = inverse_relations.get_mut(&ref_table) {

View File

@ -1,4 +1,6 @@
//! Source code adapted from https://github.com/Peternator7/strum //! Source code adapted from https://github.com/Peternator7/strum
#![allow(dead_code)]
pub mod enum_iter; pub mod enum_iter;
pub mod helpers; pub mod helpers;

View File

@ -1054,8 +1054,8 @@ where
} else { } else {
acc.insert(key, vec![value]); acc.insert(key, vec![value]);
} }
} else if acc.get(&key).is_none() { } else {
acc.insert(key, vec![]); acc.entry(key).or_default();
} }
acc acc