Skip to content

Commit

Permalink
Fix retraction for persistent set index (#521)
Browse files Browse the repository at this point in the history
* Fix retraction for persistent set index

* Add changelog entry
  • Loading branch information
jsmassa authored Apr 26, 2022
1 parent 181e423 commit a27c860
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
- Fix tx-meta on transact through api-ns
- Improve code samples using transact with arg-map @podgorniy
- Insert into persistent sorted set does not replace existing datom with identical EAV
- Single datom retraction fixed for persistent set index

## 0.4.0

Expand Down
5 changes: 3 additions & 2 deletions src/datahike/db.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -2043,8 +2043,9 @@
[e a]
(let [v (if (ref? db a) (entid-strict db v) v)]
(validate-val v entity db)
[e a v]))]
(recur (reduce transact-retract-datom report (-search db pattern)) entities))
[e a v]))
datoms (vec (-search db pattern))]
(recur (reduce transact-retract-datom report datoms) entities))
(recur report entities))

(= op :db.fn/retractAttribute)
Expand Down

0 comments on commit a27c860

Please sign in to comment.