newbie: incorrect code in AshPostgres examples?
https://hexdocs.pm/ash_postgres/get-started-with-ash-postgres.html#aggregates
the last example there is about loading aggregates on demand, and includes in particular:
which is confusing to me as well as the compiler. im new to ash and elixir but how would a domain have a
read
action? domains dont even take actions. the compiler says (UndefinedFunctionError) function Helpdesk.Support.read!/1 is undefined or private
Solution:Jump to solution
Just to add that you can have code_interfaces on your domain, that have functions you can call. But in that case you won't need to pass the Resource. https://hexdocs.pm/ash/code-interfaces.html
2 Replies
Yes, I think it's an error. Should be
Ash.read!
Solution
Just to add that you can have code_interfaces on your domain, that have functions you can call. But in that case you won't need to pass the Resource. https://hexdocs.pm/ash/code-interfaces.html