I installed Coherence and when I run my server I’m getting the following warning message
warning: function Magnify.User.__struct__/0 is undefined (module Magnify.User is not available)
Found at 2 locations:
lib/magnify/coherence/schemas.ex:35
lib/magnify/coherence/schemas.ex:39
warning: function Magnify.User.changeset/2 is undefined (module Magnify.User is not available)
Found at 3 locations:
lib/magnify/coherence/schemas.ex:31
lib/magnify/coherence/schemas.ex:35
lib/magnify/coherence/schemas.ex:39
I’m not sure why schemas is generated by coherence and here is the code
def change_user(struct, params) do
@user_schema.changeset struct, params
end
def change_user(params) do
@user_schema.changeset @user_schema.__struct__, params
end
def change_user do
@user_schema.changeset @user_schema.__struct__, %{}
end
For some reason it expects Magnify.User instead of your Magnify.Coherence.User. Maybe try replacing Magnify.Coherence.User with Magnify.User and see if that would make it work. Or search for Magnify.User in your project and see if there is some config typo.