Oid for Mnesia

Ulf Wiger <>
Mon Oct 18 16:41:37 CEST 1999


Records must be defined as 
-record(Name:atom(), {Attr1:atom() [  = Default:term()] [, ...]}).

That is, you cannot define a compund structure of attributes.
On the other hand, you can assign any value to an attribute.

If you need to define the data types of your objects, you
can do that using the RDBMS user contribution on http://www.erlang.org

/Uffe


On Sat, 16 Oct 1999, Hector Garza wrote:

hgarza>I'm defining a table in which the primary key is formed of two
hgarza>attributes, not just one (relation-2 foreign keys).
hgarza>    The thing is that when I try to initialize the table, I get the
hgarza>message that I have a bad record definition, which points to  the first
hgarza>element of the record (./cf.hrl:39: bad record field).
hgarza>
hgarza>These are the record definitions I've tried>
hgarza>
hgarza>-record(placed_on,   { [id_procedure,id_plataform],
hgarza>                                     path}).
hgarza>
hgarza>-record(placed_on,   { {id_procedure,id_plataform},
hgarza>                                     path} ).
hgarza>
hgarza>As you see, I tried first to define the first element as a list, and
hgarza>then as a tuple, but none of those ways work.
hgarza>
hgarza>Any of you guys could help me on this...
hgarza>thanks
hgarza>hector garza>
hgarza>
hgarza>

Ulf Wiger, Chief Designer AXD 301
Ericsson Telecom AB                          tfn: +46  8 719 81 95
Varuvägen 9, Älvsjö                          mob: +46 70 519 81 95
S-126 25 Stockholm, Sweden                   fax: +46  8 719 43 44




More information about the erlang-questions mailing list