AE
Ash Elixir•3y ago
axelb

postgres function undefined

Setup of AshPostgres is not going well this time, I am getting the following error:
** (CompileError) lib/zenvtc/accounts/resources/user.ex:4: undefined function postgres/1 (there is no such import)
** (CompileError) lib/zenvtc/accounts/resources/user.ex:4: undefined function postgres/1 (there is no such import)
The offending file looks like this:
defmodule Zenvtc.Accounts.User do
use Ash.Resource, data_layer: AshPostgres.Datalayer

postgres do
table "users"
repo Zenvtc.Repo
end

attributes do
uuid_primary_key :id
end
end
defmodule Zenvtc.Accounts.User do
use Ash.Resource, data_layer: AshPostgres.Datalayer

postgres do
table "users"
repo Zenvtc.Repo
end

attributes do
uuid_primary_key :id
end
end
And mix deps.get included these two lines:
ash 2.5.16
ash_postgres 1.3.5
ash 2.5.16
ash_postgres 1.3.5
I gotta say I am confused. Is something malfunctioning or am I really really tired and doing something obviously wrong? Thanks for your help!
3 Replies
frankdugan3
frankdugan3•3y ago
Should be DataLayer w/ a capital L.
axelb
axelbOP•3y ago
Oh, thanks. I just couldn't see it. 😅
frankdugan3
frankdugan3•3y ago
NP, I've done that before! 😄

Did you find this page helpful?