> 1>boss_db:find(master, []).
>
> [{master,"master-1",<<"naja">>,<<"tehran">>,
>          <<"naja master">>},
>  {master,"master-2",<<"artesh">>,<<"tehran">>,
>          <<"artesh master">>}]

This returned a list with two elements.

> 2> Master1= boss_db:find(master, [{id, 'equals', "master-1"}]).
>
> [{master,"master-1",<<"naja">>,<<"tehran">>,
>          <<"naja master">>}]

This returned a *list* with one element. Ángel Herranz was correct!

What you probably want is:

[Master1] = boss_db:find(master, [{id, 'equals', "master-1"}]).

> 3> Master1:attributes().
> ** exception error: bad argument
>      in function  apply/3
>
>         called as apply([{master,"master-1",<<"naja">>,<<"tehran">>,
>                                  <<"naja master">>}],
>                         attributes,[])

And this does not work with a list as the argument!


-- 
David N. Welton

http://www.welton.it/davidw/

http://www.dedasys.com/

-- 
You received this message because you are subscribed to the Google Groups 
"ChicagoBoss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at http://groups.google.com/group/chicagoboss.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/chicagoboss/CA%2Bb9R_s0Btc1biSSBABtwaJ_qLCOyCFeL_HHu%3DxFXYzeWSryaw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to