Moor: Delete using batch doesn't update stream

Created on 29 Mar 2020  路  3Comments  路  Source: simolus3/moor

So this morning i found that using batch.delete() inside batch(() {}) doesn't update data that listen from stream. The same also happen when using delete().delete() inside transaction().

Using delete().delete() normally with for loop works as expected. Sorry for my bad english.

bug

All 3 comments

Good catch, thank you for the report!

This will be fixed in the next moor release. In the meantime, you could use the for-loop approach or manually call database.notifyUpdates({updatedTable})

Thank you for your quick response, let me thanks you for this excellent package that you create and your hard work and quick response to solve bug in this package.

@simolus3

or manually call database.notifyUpdates({updatedTable})

The correct call seems to be database.markTablesUpdated({updatedTable}).
I am having a similar problem with cascading deletes not updating the stream. Now that I think about this I am not sure that moor actually knows about these dependencies.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

novas1r1 picture novas1r1  路  4Comments

jerryzhoujw picture jerryzhoujw  路  4Comments

Beloin picture Beloin  路  4Comments

tony123S picture tony123S  路  4Comments

tony123S picture tony123S  路  4Comments