# How are people pulling collections in cloud?

**URL:** <https://forum.datomic.com/t/how-are-people-pulling-collections-in-cloud/948>\
**Category:** Client API\
**Created:** [April 22, 2019, 12:32am UTC](https://forum.datomic.com/t/how-are-people-pulling-collections-in-cloud/948 "2019-04-22T00:32:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dean](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.datomic.com/dean/32/291_2.png) [@Dean](https://forum.datomic.com/u/Dean)\
**Post date:** [April 22, 2019, 12:32am UTC](https://forum.datomic.com/t/how-are-people-pulling-collections-in-cloud/948/1 "2019-04-22T00:32:00Z")

</div>

Since the find-coll … expression and pull-many is not available, are people using recursive pulls? I’m using ions and was a bit surprised that find-coll was not available in the :ion server type.

Cheers,  
Dean

---

<div class="post-metadata">

**Author:** ![teodorlu](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.datomic.com/teodorlu/32/288_2.png) [@teodorlu](https://forum.datomic.com/u/teodorlu)\
**Post date:** [April 23, 2019, 7:18am UTC](https://forum.datomic.com/t/how-are-people-pulling-collections-in-cloud/948/2 "2019-04-23T07:18:29Z")

</div>

If I understand you correctly, you can use pull syntax in a recursive way. Consider the following schema:

```clojure
{:pull-request/author {:db/valueType :db.type/ref}
 :pull-request/comments {:db/valueType :db.type/ref
                         :db/cardinality :db.cardinality/many}
 :comment/author {:db/valueType :db.type/ref}}

```

You could then

```clojure
(require '[datascript.core as ds)
(def test-db ...)

(ds/q '[:find [(pull ?e [* {:pull-request/comments [* {:comment/author [*]}]}]) ...]
        :where
        [?e :pull-request/title]]
      @test-db)
;; => [{:db/id 1,
;; :pull-request/author #:db{:id 2},
;; :pull-request/comments
;; [{:db/id 3,
;; :comment/author
;; {:db/id 5, :user/avatar "http://avatars.com/cjno", :user/name "Christian"},
;; :comment/text "A question"}
;; {:db/id 4,
;; :comment/author
;; {:db/id 2, :user/avatar "http://avatars.com/magnars", :user/name "Magnar"},
;; :comment/text "A reply"}],
;; :pull-request/title "A pull request"}]

```

Note: I’ve tested the above with Datascript and not Datomic, but I think the behavior is the same.

---

<div class="post-metadata">

**Author:** ![Dean](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.datomic.com/dean/32/291_2.png) [@Dean](https://forum.datomic.com/u/Dean)\
**Post date:** [April 24, 2019, 9:00am UTC](https://forum.datomic.com/t/how-are-people-pulling-collections-in-cloud/948/4 "2019-04-24T09:00:58Z")

</div>

Thanks @teodorlu. I’d made an assumption a while ago about find-coll which was incorrect. I was using

```
 [(pull ?e [* {:pull-request/comments [* {:comment/author [*]}]}]) ...]

```

when in fact

```
(pull ?e [* {:pull-request/comments [* {:comment/author [*]}]}]) 

```

does the job.

---

<div class="post-metadata">

**Author:** ![teodorlu](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.datomic.com/teodorlu/32/288_2.png) [@teodorlu](https://forum.datomic.com/u/teodorlu)\
**Post date:** [April 29, 2019, 5:10am UTC](https://forum.datomic.com/t/how-are-people-pulling-collections-in-cloud/948/5 "2019-04-29T05:10:25Z")

</div>

Glad to hear it helped!
