Jaguar-dart / jaguar_orm

Source-generated ORM with relations (one-to-one, one-to-many, many-to-many), preloading, cascading, polymorphic relations, etc
https://jaguar-dart.github.io
BSD 3-Clause "New" or "Revised" License
217 stars 52 forks source link

Fix of issue #89 in https://github.com/Jaguar-dart/jaguar_orm/issues/89: #90

Closed MartinHlavna closed 5 years ago

MartinHlavna commented 5 years ago

In case of ManyToMany relation, writer.dart have written cascade functionality for insert and upsert statements. However it was generating code that have used incorrect variable.

model, which is input parameter don't have to have id, in case if it is insert of new entity with autogenerated PrimaryKey.

tejainece commented 5 years ago

Thanks for the PR!