Created
November 2, 2019 20:01
-
-
Save mazz/5d7f957c1eae8a7705ff3d787dd3856a to your computer and use it in GitHub Desktop.
field `taskcategories` in `select` is a virtual field in schema Db.Schema.Task in query:
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(task in Task, | |
join: org in Org, | |
join: rubric in Rubric, | |
join: coursecode in CourseCode, | |
join: task_category in TaskCategory, | |
where: org.uuid == ^org_uuid, | |
where: org.id == task.org_id, | |
where: rubric.id == task.rubric_id, | |
where: coursecode.id == task.coursecode_id, | |
where: task_category.task_id == task.id, | |
preload: [taskcategories: :taskitems], | |
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: rubric, | |
coursecode: coursecode, | |
task_category: task.taskcategories, | |
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
fixed: