Skip to content

Instantly share code, notes, and snippets.

@cigitia
cigitia / gist:feafd70768fcd551cd16
Last active August 29, 2015 14:15
DataScript 0.9.0 demonstration of possible bug in entity-ID generation when creating new component entities within transaction
(ns demo.main
(:require [datascript :as ds]))
(def schema
{:x/component {:db/valueType :db.type/ref ; Required to demonstrate bug.
:db/isComponent true ; Required to demonstrate bug.
:db/cardinality :db.cardinality/many
; Not required but demonstrates what happens to ID numbering
; after first component.
}})