-
-
Save elbow-jason/696174bf7d5c0a320a79 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
query = from workout in Workout, | |
where: workout.id == ^id, | |
left_join: group in assoc(workout, :workout_set_groups), | |
left_join: set in assoc(group, :workout_sets), | |
join: excercise in assoc(group, :excercise), | |
preload: [workout_set_groups: {group, excercise: excercise, workout_sets: set}] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment