Err David beat me to it. I also did [Master1] in my haste and should have done something like [Master1 | _]
-- Jesse Gumm Owner, Sigma Star Systems 414.940.4866 || sigma-star.com || @jessegumm On May 13, 2014 10:53 AM, "Jesse Gumm" <[email protected]> wrote: > There the problem. find returns a list of elements, not a single element. > So Master1 is a list of elements. > > Do > > [Master1] = boss_db:find(master, [{id, 'equals', "master-1"}]). > > Then your attributes call should work. > > -Jesse > > -- > Jesse Gumm > Owner, Sigma Star Systems > 414.940.4866 || sigma-star.com || @jessegumm > On May 13, 2014 10:46 AM, "rastin rastini" <[email protected]> > wrote: > >> model file is attached. >> >> this is an work flow: >> >> 1>boss_db:find(master, []). >> [{master,"master-1",<<"naja">>,<<"tehran">>, >> <<"naja master">>}, >> {master,"master-2",<<"artesh">>,<<"tehran">>, >> <<"artesh master">>}] >> >> >> 2> Master1= boss_db:find(master, [{id, 'equals', "master-1"}]). >> [{master,"master-1",<<"naja">>,<<"tehran">>, >> <<"naja master">>}] >> >> 3> Master1:attributes(). >> ** exception error: bad argument >> in function apply/3 >> called as apply([{master,"master-1",<<"naja">>,<<"tehran">>, >> <<"naja master">>}], >> attributes,[]) >> >> -- >> 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/d8a4891c-c59e-431c-a7fc-712f68572a03%40googlegroups.com<https://groups.google.com/d/msgid/chicagoboss/d8a4891c-c59e-431c-a7fc-712f68572a03%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > -- 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/CAPTXyXdi7T5h8%2BTE%2BQmSQ7OttLFyn4tv2JUv8F3JdwWBxfXKDg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
