[cli] generate Related for m-to-n relation (#1075)

This commit is contained in:
Billy Chan 2022-10-26 11:20:33 +08:00 committed by GitHub
parent a786dfd616
commit a3fb8e8b0d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -136,8 +136,7 @@ impl EntityTransformer {
continue; continue;
} }
let is_conjunct_relation = entity.primary_keys.len() == entity.columns.len() let is_conjunct_relation = entity.primary_keys.len() == entity.columns.len()
&& rel.columns.len() == 2 && entity.relations.len() == 2
&& rel.ref_columns.len() == 2
&& entity.primary_keys.len() == 2; && entity.primary_keys.len() == 2;
match is_conjunct_relation { match is_conjunct_relation {
true => { true => {