Fork me on GitHub
#datascript
<
2016-01-20
>
bplatz14:01:49

I'm trying to load some schema data dynamically and reset! the datascript conn when received. I get a Assert failed (conn? conn). Any ideas why?

bplatz14:01:27

That snippet will produce the error.

bplatz15:01:12

I've also attempted to swap! just the schema on the atom directly, but I have similar problems in that it doesn't appear to obey the new schema.

bplatz15:01:32

I've figured out the fist problem, I think. A Clojure mistake by me, not Datascript... I needed to deref the second one... @(d/create-conn ...

bplatz15:01:39

swap! on the schema still does not obey the new schema, I suspect there is some optimization/memoization in there somewhere preventing it from working.