Skip to content

Instantly share code, notes, and snippets.

@mazz
Created November 1, 2019 01:13
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 mazz/d4bf3e9965876df798ac488793ac1ba6 to your computer and use it in GitHub Desktop.
Save mazz/d4bf3e9965876df798ac488793ac1ba6 to your computer and use it in GitHub Desktop.
** (Ecto.Query.CompileError) `from_struct(rubric)` is not a valid query expression.
query =
from(task in Task,
join: org in Org,
join: rubric in Rubric,
where: org.uuid == ^org_uuid,
where: org.id == task.org_id,
where: rubric.id == task.rubric_id,
select: %{
title: task.task_title,
uuid: task.uuid,
org_uuid: org.uuid,
archived: task.archived,
course_task_type: task.course_task_type,
task_id: task.id,
rubric: from_struct(rubric),
coursecode_id: task.coursecode_id,
inserted_at: task.inserted_at,
updated_at: task.updated_at,
hash_id: task.hash_id
}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment