arangodb_ecto icon indicating copy to clipboard operation
arangodb_ecto copied to clipboard

Add "preload" feature

Open pinx opened this issue 7 years ago • 2 comments

We have to translate Query.preload and Repo.preload into something like AQL subqueries

from p in Post,
  join: c in assoc(p, :comments),
  preload: [comments: c]

should translate into

FOR p IN posts
  FOR c IN comments
  FILTER p._key == c.post_id
RETURN { post : p, comments : c }

pinx avatar Mar 26 '18 22:03 pinx

IMHO this should work already.

mpoeter avatar Mar 27 '18 07:03 mpoeter

I added it to #8 as an undocumented feature.

pinx avatar Mar 27 '18 10:03 pinx