Fork me on GitHub

Is there a RAD attribute type for a collection? Something that could be used for a set like :account/phone-numbers, where it doesn't need to exist in some other model and get accessed as a :ref. :enum sounds more like a set of multiple choice options, so I guess that's not it.


What you are looking for is probably type :string with :cardinality :many


Datomic models those just fine, and they in fact have set semantics


I'm on xtdb but I'd guess the intended behaviour is similar, if supported. I will try that out. I thought :cardinality was just intended for :ref types, but the docs are clear: > Supported when the type of the attribute is :ref, and some database adapters may support it on other types. Thanks @U0CKQ19AQ!

👍 1

Really it is up to the db adapter…SQL has array types on columns, for example. You can always encode what you want somehow. I don’t know enough about XTDB, but can’t you just put a set on an attribute? {:account/phone-numbers #{…}}


I know it is a document db on clj data, so that would be my first thing I’d try


In the backend that's exactly what intending to do. The storage part is clear. And I can always just make it a ref type and have the resolver return the set stored on that key in the document. I wasn't sure if any of the base RAD attribute types would align with it properly. I guess :string with :many should be the way to use a set on the attribute.

Jakub Holý (HolyJak)15:03:29

I don't think so since eg a general sql DB wouldn't know how to store that. But you can create your own types, I suspect?


Not something I've done before but I suspect that's the way forward. Just wanted to check if there was a common approach people are using already.

Brian Marco19:03:25

I'm new to fulcro and I'm trying to get the fulcro-template running. When I run (start) in the developments ns in the repl the chromium console gives me GET net::ERR_ABORTED 404 (Not Found)

Tyler Nisonoff20:03:45

did you compile the front-end with shadow?

Tyler Nisonoff20:03:17

should see something built at

if you’re using the default set-up

Brian Marco20:03:01

That was it, thanks. I missed half a step in the README

Jakub Holý (HolyJak)06:03:50

Welcome to Fulcro! I ma glad Tyler was able to help you. PRs making the steps harder to miss are always welcome 🙂 You being a newbie, I would like to pick your brain if you will 🙂 How did you come to Fulcro? And how have your learned it so far? 🙏