Umbrella app paginate not working
Closed this issue · 1 comments
pedromvieira commented
On a "normal app" works an ecto query then paginate.
Ex:
Normal.People.Lists.list_filter("por", true, "demo") |> Normal.Repo.paginate(%{page_size: 10})
With the same config on an umbrella app, it fails. (Both Repo and Scrievener/Ecto on the same app)
Ex:
UmbrellaApp.People.Lists.list_filter("por", true, "demo") |> UmbrellaApp.Repo.paginate(%{page_size: 10})
Output:
** (Protocol.UndefinedError) protocol Scrivener.Paginater not implemented for [%UmbrellaApp.People.List{__meta__: #Ecto.Schema.Metadata<:built, "lists">, data: %{"author_id" => 1, "author_subdomain" => "demo", "cdn_file" => "accounts/demo/demo_list_template-pt.xlsx", "country" => "BRA", "editor_id" => 1, "editor_subdomain" => "demo", "locale" => "por", "targets" => 1, "usage" => 27, "version" => 13}, enabled: true, id: 1, inserted_at: nil, name: "Vieira", targets: #Ecto.Association.NotLoaded<association :targets is not loaded>, updated_at: {{2018, 7, 23}, {13, 11, 14, 653266}}}]. This protocol is implemented for: Atom, Ecto.Query
(scrivener) deps/scrivener/lib/scrivener/paginater.ex:1: Scrivener.Paginater.impl_for!/1
(scrivener) deps/scrivener/lib/scrivener/paginater.ex:10: Scrivener.Paginater.paginate/2
pedromvieira commented
I forgot to add {:scrivener_list, ">= 1.0.1"} on umbrella app mix.