Set PollOpt preload order (#187)

This commit is contained in:
Raúl R Pearson
2025-11-20 12:37:18 +00:00
committed by GitHub
parent 5853bc34d8
commit 10a5392d56

View File

@@ -27,7 +27,11 @@ defmodule Claper.Polls.Poll do
field :show_results, :boolean
belongs_to :presentation_file, Claper.Presentations.PresentationFile
has_many :poll_opts, Claper.Polls.PollOpt, on_replace: :delete
has_many :poll_opts, Claper.Polls.PollOpt,
preload_order: [asc: :id],
on_replace: :delete
has_many :poll_votes, Claper.Polls.PollVote, on_replace: :delete
timestamps()