I defined an entry called log . I want to create a mnesia table named log_table . When I try to write a record to a table, I get a bad_type error as follows:
( node1@kitt )4> mnesia:create_table(log_table, [{ram_copies, [node()]}, {attributes, record_info(fields, log)}]). {atomic,ok} ( node1@kitt )5> mnesia:dirty_write(log_table, #log{id="hebelek"}). ** exception exit: {aborted,{bad_type,#log{id = "hebelek"}}} in function mnesia:abort/1
What am I missing?
source share