Skip to content

Instantly share code, notes, and snippets.

@ifsc01
Created April 24, 2018 03:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ifsc01/0d333563a709df7b1c30432b74925246 to your computer and use it in GitHub Desktop.
Save ifsc01/0d333563a709df7b1c30432b74925246 to your computer and use it in GitHub Desktop.
- client = GameManager.get_client!(id)
+ client = GameManager.get_client!(id) |> Center.Repo.preload(:server_group)
+ # require IEx; IEx.pry
+ # Repo.all from s in Server, join: c in ServerGroupServer, where: c.server_group_id == 3 and c.server_id == s.id
+ # Repo.one from c in Client, where: c.id == 1, preload: [server_group: :servers]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment