Fork me on GitHub
#datomic
<
2017-06-18
>
eoliphant01:06:20

is there any way to retract without the value? I saw a discussion about this in the group from ’14 or so, but was wondering if anything’s been added since.

favila02:06:50

Only one "intrinsic" way: assert new fact on cardinality-one e+a

favila02:06:57

One indirect way: :db.fn/retractEntity tx fn will retract a whole tree of things on an entity without knowing their value

favila02:06:34

Otherwise you need to write a transaction function which reads the current value first so it can retract it

favila02:06:46

Keep in mind that retraction without a value is essentially saying "last writer wins". Be sure that's the semantics you want

eoliphant02:06:48

ok, thx, yeah in this case, it’s just a single attribute, will look at using a tx fn.

eoliphant02:06:57

yeah that’s a good point as well

favila02:06:22

Datomic has set semantics on card-many, often you can reconcile different writes safely

favila02:06:44

(Not always though)

eoliphant02:06:02

yeah and in this case it’s actually a card-one

eoliphant02:06:09

going to rethink it a bit