[erlang-questions] Illusive mnesia bug
Jesper Louis Andersen
jesper.louis.andersen@REDACTED
Tue Nov 10 19:42:32 CET 2015
On Tue, Nov 10, 2015 at 7:24 PM, <lloyd@REDACTED> wrote:
> 5. BUT, nim_links1/1 fails:
>
> 50> nim_links1:put_record(Record).
>
> ** exception error: no match of right hand side value
> {aborted,{no_exists,weblink}}
> in function nim_links1:put_record/1 (/home/lloyd/nindex/site/src
> /nim_links1.erl, line 50)
>
Your problem is that you have a record #weblink{} but the table you create
is named ?TABLE which is the value 'links'. You have not supplied
{record_name, weblink} so the default record name becomes the same as the
table name. The error mnesia reports is because there is no table in which
to place #weblink{} records, but you should have one named links. Test with
`mnesia:table_info(links, all)`.
--
J.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20151110/a7e651e8/attachment.htm>
More information about the erlang-questions
mailing list