-
Notifications
You must be signed in to change notification settings - Fork 101
Open
Description
Hey guys.
I've been having some issues executing queries with select bidings and ordering by these bidings using fragments.
If I have some query that is using :select bidings for example and ordered by it using fragment:
from(
u in User,
join: c in Contact,
on: c.user_id = u.id,
order_by: fragment("new_field")
select: %{
new_field: c.some_field
}
)My cursor fields can't find my new_field on my query during pagination but none option worked:
[cursor_fields: [{:new_field, :desc}], limit: 10]
[cursor_fields: [{"new_field", :desc}], limit: 10]I also tried using but not had success
fetch_cursor_value_fun: fn
schema, :new_field ->
schema.new_field
schema, field ->
Paginator.default_fetch_cursor_value(schema, field)
end,I'm doing some mistake or it is just not possible to do it?
Metadata
Metadata
Assignees
Labels
No labels