This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-02-19
Channels
- # beginners (134)
- # boot (4)
- # cider (23)
- # clara (2)
- # cljs-dev (2)
- # cljsrn (4)
- # clojure (147)
- # clojure-austin (9)
- # clojure-berlin (2)
- # clojure-dusseldorf (2)
- # clojure-france (2)
- # clojure-italy (11)
- # clojure-russia (1)
- # clojure-spec (18)
- # clojure-uk (182)
- # clojurescript (40)
- # community-development (5)
- # cursive (29)
- # datascript (6)
- # datomic (18)
- # duct (6)
- # emacs (4)
- # events (1)
- # fulcro (46)
- # hoplon (5)
- # jobs-discuss (12)
- # keechma (1)
- # luminus (7)
- # lumo (1)
- # off-topic (11)
- # onyx (9)
- # parinfer (5)
- # protorepl (1)
- # re-frame (18)
- # reagent (23)
- # reitit (2)
- # ring (5)
- # ring-swagger (20)
- # schema (1)
- # shadow-cljs (32)
- # spacemacs (1)
- # specter (2)
- # vim (26)
Is “filter” likely to be supported by the Cloud/Client API in future? It’s not there now but, because as-of is already supported, it seems like using custom filters might be possible/in the works. This is really valuable for building a multi-tenant web service so I suspect I’m not the only one interested in this.
Question: I've looked through the doco but I can't find anything clear on this. I have two entities, let's call them order and order-item. I want to create an order, which will have two order items. I will transact both order items, then transact the order, which will include two references to the two order-items. I have created a :db.type/ref entry with a cardinality of many in order to hold these references to order-items. How do I actually get the refs from transacting the order-items so to 'insert' them into the order transaction?
@sleepyfox the tempids section of https://docs.datomic.com/cloud/transactions/transaction-processing.html may help
but I would back up and ask “how can an order line item exist without an order”?
aren’t they “cart items” or “potential order items” or something at that moment in time?
I assume that there must be some sort of equivalent of a foreign key reference, but the doco is rather light on examples
@sleepyfox have you seen the tutorials repo? This stories/comments example is fairly similar to orders/items https://github.com/cognitect-labs/day-of-datomic-cloud/blob/master/tutorial/component_attributes.clj
Also in thr docs here https://docs.datomic.com/on-prem/transactions.html#adding-entity-references
@sleepyfox - also https://docs.datomic.com/on-prem/transactions.html#nested-maps-in-transactions
Hey all, quick question: part of my client's requirement is to "reset their account information", meaning clear all fields. If I remember correctly, I wasn't able to transact an empty map as an entity into datomic...what would be the recommended way to accomplish something like this?
retract the datoms: [:db/retract entity-id ident val-to-retract]
I was considering potentially transacting something like { :user/reset (Date.) }
to capture that event as data as their new profile
@joelsanchez thaaat makes more sense. Thanks 🙂