Skip to content

Commit 6c67749

Browse files
committed
chore: fix manual relationships example
closes #540
1 parent 13b67c6 commit 6c67749

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

documentation/topics/advanced/manual-relationships.md

+3
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,9 @@ defmodule MyApp.Employee.ManagedEmployees do
122122
|> where([l], l.manager_id in ^employee_ids)
123123
|> recursive_cte_query("employee_tree", Employee)
124124
|> Repo.all()
125+
|> Map.new(fn employee ->
126+
{employee.id, employee}
127+
end)
125128

126129
employees
127130
|> with_descendants(all_descendants)

0 commit comments

Comments
 (0)