Fork me on GitHub
#datomic
<
2019-11-18
>
onetom09:11:25

is it not possible to use reverse navigation style in tx-data within entity maps? im getting an invalid lookup ref error:

{:cognitect.anomalies/category :cognitect.anomalies/incorrect,
 :cognitect.anomalies/message "Invalid list form: [#:db{:id 17592186045418}]",
 :db/error :db.error/invalid-lookup-ref}
when trying this:
{:db/ident :new-entity-being-pointed-to-by-a-card-many-attr
 :card-many/_attribute [{:db/id 132} {:db/id 345} ...]}
or "Invalid list form: [17592186045418]" when just trying :card-many/_attribute [123 345] it would be the inverse of a pull expression containing reverse navigation, eg:
;; pattern
[:artist/_country]

;; result
{:artist/_country [{:db/id 17592186045751} {:db/id 17592186045755} ...]}
https://docs.datomic.com/on-prem/pull.html#org31dcc1a

mavbozo09:11:56

@onetom It's possible, but you have to specify the relationship one-by-one. e.g:

mavbozo09:11:03

[{:db/ident :new-entity-being-pointed-to-by-a-card-many-attr :card-many/_attribute 132} {:db/ident :new-entity-being-pointed-to-by-a-card-many-attr :card-many/_attribute 345} {:db/ident :new-entity-being-pointed-to-by-a-card-many-attr :card-many/_attribute ...} {:db/ident :new-entity-being-pointed-to-by-a-card-many-attr :card-many/_attribute ...}]

onetom10:11:10

hmm... interesting. thx. i guess it's simpler to just use the forward reference than and the :db/add function style

babardo14:11:01

Datomic cloud question: is it possible to run local only integrations test without access to aws infra ?

babardo14:11:14

I tried https://github.com/ComputeSoftware/datomic-client-memdb based on peer library for an in memory db. But it looks like it doesn't support tuples during schema creation.

favila14:11:01

it uses datomic-free by default, which hasn’t been updated in a while (i.e. since before tuples were introduced)

favila14:11:15

try excluding that and depending on a recent datomic-pro

👍 4
babardo14:11:52

Ok i'll try that

babardo15:11:10

Thanks you, it worked with a datomic pro.

babardo15:11:15

But what about licensing ? (my company already is on a datomic cloud plan)

favila15:11:38

how did you get datomic-pro without a license? starter license?

👍 4
favila15:11:18

anyway, all on-prem licenses are perpetual, so you can keep using this forever. plus you are not actually running a transactor

favila15:11:39

agreed this is an odd situation

😢 4
babardo15:11:54

ok thanks for your help, we'll try to find an answer from our side 🙂

folcon18:11:18

I don’t remember datomic string being limited to 256 chars, is this a change? Or am I misremembering?

favila19:11:29

it should be 4096 and only on cloud

folcon19:11:17

@U09R86PA4 just wondering if there was ever any plan to do edn or blob type? Or is string supposed to be for that usecase?

favila19:11:55

they never give roadmaps, so I donno for sure, but this table talks about “LOB” types: https://docs.datomic.com/on-prem/moving-to-cloud.html#other

favila19:11:36

Likely this means the data goes to s3 and a pointer is stored in datomic

favila19:11:13

this is a technique you should use with large objects in datomic anyway (strings or binary) even for on-prem

favila19:11:37

on-prem doesn’t have hard size limits, but it’s still a bad idea

folcon19:11:13

Yea, that’s the problem.

folcon19:11:23

It worries me a little that this hasn’t been addressed yet…

folcon19:11:30

Thanks though =)…

folcon19:11:55

@U064X3EF3 Sorry to bug you, but just wondering if there’s any way of knowing if/when LOB types are planned for?

Alex Miller (Clojure team)19:11:31

I'm not on the Datomic team

Alex Miller (Clojure team)19:11:03

so I don't know any more than you :)

folcon19:11:03

Fair enough 😃..

folcon18:11:58

Currently trying to setup an import operation which is a bit fiddly

colinkahn19:11:48

Are there any tools to validate datalog? For instance you can’t use (and ...) as a direct descendant of :where. My use case is to validate something that programmatically generates datalog from some input.

dvingo19:11:02

For anyone who may run into this in the future.... Our team was seeing datomic cloud deploys work for one developer while failing for another developer when we had the exact same clj files, deps.edn, and ion-config.edn files (copied and pasted from the dev who successfully deployed). The deploy ended up working on a clean git clone into a new directory. We figured out that we had run a "compile" in the local directory of the dev with the failing build and the "classes" directory was being executed instead of the new clj source files. Removing the classes directory solved our problem and we can now deploy.....

👍 12