Skip to content

v3.9.1

Choose a tag to compare

@lehni lehni released this 13 Oct 21:37
· 223 commits to main since this release

Fixes

  • insertGraph() and upsertGraph() reject only after the queries they already started have finished, so a transaction is rolled back after them. Before, rows of these queries could be committed after the rollback on SQLite #336
  • upsertGraph() sets the foreign key of a model that a #ref relates into a HasManyRelation or HasOneRelation. Before, the row was left without it, and the id of the owner could be cleared #311
  • upsertGraph() with relate and noUpdate writes the foreign keys of models that it relates through a HasManyRelation or HasOneRelation, like it does for BelongsToOneRelation and ManyToManyRelation, instead of leaving them unrelated without an error, as it did since 1.5.0 #355
  • upsertGraph() resolves a #ref{} to a value of an existing model, e.g. a foreign key that an inserted related model gives it, once the graph has filled it in. Before, it read the old value, e.g. undefined #356, #378
  • upsertGraph() rejects a graph with cyclic references before it writes anything. Before, it still ran the deletes of the rows that the graph leaves out after the rejection, which deleted them without a transaction and failed after the rollback of one, since 1.5.0 #379
  • A many-to-many patch() / update() with join table extras and limit() on MySQL and SQL Server writes the extras to the join rows of the related rows that the limit picks when the relation joins through a related column other than the id, instead of to the join rows that refer to other rows by these ids, as it did since 3.8.0 #360