Fork me on GitHub
#datomic
<
2016-04-20
>
currentoor20:04:27

I'm trying to do a simple join in a pull api call. And I get

:db.error/invalid-recur-limit Cannot interpret as a recursive pull
   specification: :db/ident
   {:db/error :db.error/invalid-recur-limit}

currentoor20:04:33

Any ideas what the cause might be?

currentoor20:04:11

(d/pull db [{:data-source/response-type :db/ident}]
                                    [:data-source/id data-source-id])

Ben Kamphaus20:04:55

@currentoor: :db/ident needs to be [:db/ident]

Ben Kamphaus20:04:58

More specifically, the value position in a map-spec needs to be a pattern itself, so wrapped in a list or a vector. Since it can’t parse it as a pattern it tries to parse it as a recursion-limit, which fails. May seem overkill at times but I find stepping through the grammar helpful when troubleshooting patterns that don’t seem to be working: http://docs.datomic.com/pull.html#grammar