Programming Phoenix LiveView: confusing alias instructions on 226

Let’s add a few functions to the core in product/query.ex . First, make sure you alias Pento.Accounts.User and Pento.Survey.Demographic at the top of the Catalog.Product.Query module. Then, add these functions

This would be clearer if the instruction to add the alias’ was in the code block. I missed this and got a very uninformative error from Ecto:

** (UndefinedFunctionError) function User.schema/1 is undefined (module User is not available)
User.schema(:source)
(ecto 3.7.1) lib/ecto/repo/queryable.ex:203: Ecto.Repo.Queryable.execute/4
(ecto 3.7.1) lib/ecto/repo/queryable.ex:19: Ecto.Repo.Queryable.all/3