[erlang-questions] Error inserting record into Mnesia

Chris Hicks silent_vendetta@REDACTED
Mon May 31 05:59:32 CEST 2010


Gah, I should have known that. Feel stupid for having hacked away for half an hour and scanning the docs just to have missed that one piece. Thank you.

> From: igorrs@REDACTED
> Date: Mon, 31 May 2010 00:51:05 -0300
> To: silent_vendetta@REDACTED
> CC: erlang-questions@REDACTED
> Subject: Re: [erlang-questions] Error inserting record into Mnesia
> 
> 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.
> 
> ________________________________________________________________
> erlang-questions (at) erlang.org mailing list.
> See http://www.erlang.org/faq.html
> To unsubscribe; mailto:erlang-questions-unsubscribe@REDACTED
> 
 		 	   		  
_________________________________________________________________
The New Busy is not the old busy. Search, chat and e-mail from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_3


More information about the erlang-questions mailing list