Hi Jachym,<div><br></div><div>Yes, mnesia:create_schema is what I forgot to do.</div><div>Thanks for your help.</div><div><br></div><div>Philip</div><div><br><br><div class="gmail_quote">On Wed, Oct 31, 2012 at 9:09 PM, Jachym Holecek <span dir="ltr"><<a href="mailto:freza@circlewave.net" target="_blank">freza@circlewave.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"># Philip Clarke 2012-10-31:<br>
<div><div class="h5">> Hi,<br>
><br>
> I have a simple record defined as:<br>
> -record(user, {id, name}).<br>
><br>
> Next I start up mnesia and try to create a table as follows:<br>
><br>
> mnesia:create_table(user, [{type, ordered_set}, {disc_copies, [node()]},<br>
> {attributes, record_info(fields, user)}]).<br>
><br>
> This gives me this error:<br>
> {aborted,{bad_type,user,disc_copies,nonode@nohost}}<br>
><br>
><br>
> If i change the table type to be ram_copies, everything works fine.<br>
> I realise that I cannot use disc_only_copies with ordered_set, but I<br>
> thought that disc_copies was supported.<br>
><br>
> Am I doing something else wrong ?<br>
<br>
</div></div>Did you forget to install disc_copies schema first? I don't think you can<br>
have disc_copies tables with ram_copies schema.<br>
<br>
  Eshell V5.8.5  (abort with ^G)<br>
  (foo@taiga)1> mnesia:create_schema([node()]).<br>
  ok<br>
  (foo@taiga)2> mnesia:start().<br>
  ok<br>
  (foo@taiga)3> mnesia:create_table(user, [{type, ordered_set},<br>
                                           {disc_copies, [node()]},<br>
                                           {attributes, [id, name]}]).<br>
  {atomic,ok}<br>
<br>
BR,<br>
        -- Jachym<br>
</blockquote></div><br></div>