Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 6c67749

Browse files
committedMay 2, 2025·
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

Lines changed: 3 additions & 0 deletions
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)
Please sign in to comment.