Fork me on GitHub
Filipe Silva15:01:14

does anyone know if the order of datoms in a tx matters?

Filipe Silva15:01:25

I have a bunch of datoms in the operation format (`[:db/add 1 :prop "value]`)

Filipe Silva15:01:20

if it helps, I know these are already normalised because I got them off a tx-report

Filipe Silva15:01:01

I'd like to know if I could transact them in a new tx but in random order, and if that'd always yield the same db


I suspect the order of :db/add and :db/retract in a transaction will matter if they refer to the same attribute of the same entity

Filipe Silva19:01:27

yes that sounds likely...

Filipe Silva19:01:04

I also tried making the order not matter and that make some pulls present varying order on ref arrays


@filipematossilva fwiw, I believe the behavior of datascript & datomic differ in behavior for this case.

Filipe Silva22:01:17

that definitely answers my question

Filipe Silva22:01:29

so yeah, order matters a lot