[erlang-questions] Error inserting record into Mnesia
Igor Ribeiro Sucupira
igorrs@REDACTED
Mon May 31 05:51:05 CEST 2010
I think it's because you didn't specify the {attributes, [id,
components, debug_components]} argument when creating the table.
On Sun, May 30, 2010 at 11:55 PM, Chris Hicks
<silent_vendetta@REDACTED> wrote:
>
> Can anyone point out to me what might be going wrong with the following code? I can't figure out why I keep getting the bad_type error.
> -record(active_entity, {id=undefined, components=[], debug_components=[]}).
> 19> Act = #active_entity{}.#active_entity{id = undefined,components = [], debug_components = []}20> mnesia:create_table(active_entity, [{ram_copies, [node()]}, {type, ordered_set}]). {atomic,ok}21> mnesia:dirty_write(active_entity, Act). ** exception exit: {aborted, {bad_type, #active_entity{ id = undefined,components = [], debug_components = []}}} in function mnesia:abort/1
> _________________________________________________________________
> The New Busy is not the too busy. Combine all your e-mail accounts with Hotmail.
> http://www.windowslive.com/campaign/thenewbusy?tile=multiaccount&ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_4
--
"The secret of joy in work is contained in one word - excellence. To
know how to do something well is to enjoy it." - Pearl S. Buck.
More information about the erlang-questions
mailing list