Welcome! Please see the About page for a little more info on how this works.

0 votes
in Cloud by

What is the recommended approach for validation here? Do we use spec or create attribute and entity predicates that cancel the transaction on failing. What use case is right for spec then if not validating domain models?

1 Answer

0 votes
by

Hi!

In general, Clojure spec is very useful for domain modeling and the Datomic level entity spec and attribute predicates are at the db level. However, I'd like to know more about your use case. Could you give me a more specific example of what you need to do?

by
I'm building a simple todo list app and I'm left wondering that if I should declare specs for the datomic attributes and write functions that check validity of those specs as the attr preds. How do I use spec in conjunction with entity and attribute predicates?
...