arangodb_ecto icon indicating copy to clipboard operation
arangodb_ecto copied to clipboard

Add "preload" feature

Open pinx opened this issue 6 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