-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(UndefinedFunctionError) function :erl_eval.match1/4 is undefined or private #55
Comments
What Erlang version? I've never seen this kind of error before. |
Is it due to defining User and Message twice with defmodule and deftable? |
That shouldn't be an issue, the actual module name inside the defdatabase gets prefixed with the database module name, so they don't collide. But now that you point that out I'm not entirely sure what the |
@meh it is Erlang/OTP version 19, more specifically 19.0.2. Modules User and Message are defined because otherwise I got this error.
I tried now running code prefixed with database name:
And result was |
Hm, not sure why I got :badarg before. I ran above code again and it worked OK. So I guess the question is why prefixing module User inside Amnesia.transaction block does not work. |
Why do you define separate structs for |
@jmerriweather agree, it doesn't make sense to have them. Is using Database.User instead of User inside transaction block expected behaviour? If it is, I can update README example. |
When I try to use example code in IEx
error is raised.
in lib/database.ex is example code from README. Database was created using
mix amnesia.create -db Database --disk
Content of database.ex
I use
Elixir 1.3.2
,{:amnesia, "~> 0.2.4"}
.What could be wrong?
The text was updated successfully, but these errors were encountered: