Skip to content

Commit

Permalink
generate Related for many-to-many relation with extra columns
Browse files Browse the repository at this point in the history
  • Loading branch information
limjiayi committed Nov 28, 2022
1 parent d32e1eb commit 6256863
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions sea-orm-codegen/src/entity/transformer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,7 @@ impl EntityTransformer {
if rel.num_suffix > 0 {
continue;
}
let is_conjunct_relation = entity.primary_keys.len() == entity.columns.len()
&& entity.relations.len() == 2
let is_conjunct_relation = entity.relations.len() == 2
&& entity.primary_keys.len() == 2;
match is_conjunct_relation {
true => {
Expand Down

0 comments on commit 6256863

Please sign in to comment.