datomic-junk icon indicating copy to clipboard operation
datomic-junk copied to clipboard

Nested entities in data loading

Open ghost opened this issue 9 years ago • 3 comments

Hi, I really like the lib since it helps loading seed data much easier. I just encounter a problem regarding nested entites while loading data:

;; bank-offer
{:bank-offer/bank :ref :one}
;; bank
{:bank/name :string}
;; projects
{:project/bank-offers :ref :many}

;; I try to load data like this, but it doesn't seem to work
{:project/bank-offers [{:bank-offer/bank {:bank/name "test"}}]}

ghost avatar Jan 16 '16 12:01 ghost

@flyingmachine

0xqd avatar Feb 08 '16 06:02 0xqd

I'm not actively working on this project, but if you're able to put together a pull request that fixes the issue (and includes tests) then I'd be happy to merge it :smile:

flyingmachine avatar Feb 08 '16 14:02 flyingmachine

@flyingmachine I have solved the problem by falling back using traditional edn and tempid. It's not really smart and it works for now. Thanks for answering :)

0xqd avatar Feb 14 '16 10:02 0xqd