Directly appending the referenced :db/id works, but not the usual {:db/id ...} syntax; same for :db/ident and :id. Example initial data:
[{:db/ident 0 :child [{:db/ident 1}]}
{:db/ident 1 :data "1"}]
Transacting the following doesn't work:
[{:db/ident 2 :data "2"}
{:db/ident 0 :child+ {:db/ident 2}}]
;; inserted into the array as:
;; #datom [:tg/node-25760 :tg/first #:db{:ident 2} 2 true]
This works:
[{:db/ident 2 :data "2" :db/id :tg/node-2}
{:db/ident 0 :child+ :tg/node-2}]
But not temporary ids:
[{:db/id -1 :db/ident 3 :data "3"}
{:db/ident 0 :child+ -1}]
;; inserted into the array as
;; #datom [:tg/node-25728 :tg/first -1 2 true]