generate Related for many-to-many relation with extra columns (#1260)
This commit is contained in:
parent
dd7454a738
commit
8e888eda7b
@ -135,9 +135,8 @@ impl EntityTransformer {
|
|||||||
if rel.num_suffix > 0 {
|
if rel.num_suffix > 0 {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
let is_conjunct_relation = entity.primary_keys.len() == entity.columns.len()
|
let is_conjunct_relation =
|
||||||
&& entity.relations.len() == 2
|
entity.relations.len() == 2 && entity.primary_keys.len() == 2;
|
||||||
&& entity.primary_keys.len() == 2;
|
|
||||||
match is_conjunct_relation {
|
match is_conjunct_relation {
|
||||||
true => {
|
true => {
|
||||||
let another_rel = entity.relations.get((i == 0) as usize).unwrap();
|
let another_rel = entity.relations.get((i == 0) as usize).unwrap();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user