Hi,

I am having a frustrating time with the tutorial and I am not
experienced enough with Erlang to see what is happening.

I am trying out the models and this happens:

15> f().
ok
16> Cheer = category:find({title, '=', <<"Cheer">>}).
mysql_conn:426: fetch <<"SELECT * FROM category WHERE (title =
'Cheer')">> (id <0.59.0>)
[{category,false,1,<<"Cheer">>,
           <<"kermit shouts: Appluase, Applause, Applause">>}]
17> E1 = entry:new(<<"Welcome to my new blog">>, <<"hello world, this
is my first Erlang App.">>, [], Cheer).
{entry,true,undefined,<<"Welcome to my new blog">>,
       <<"hello world, this is my first Erlang App.">>,[],
       [{category,false,1,<<"Cheer">>,
                  <<"kermit shouts: Appluase, Applause, Applause">>}]}
18> entry:save(E1).
mysql_conn:426: fetch <<"BEGIN">> (id <0.59.0>)
mysql_conn:426: fetch <<"ROLLBACK">> (id <0.59.0>)
** exception exit: {{'EXIT',
                     {badarg,
                      [{erlang,iolist_to_binary,
                        [{'EXIT',
                          {badarg,
                           [{erlang,list_to_binary,
                             [[39,
                               {category,false,1,<<"Cheer">>,
                                <<"kermit shout"...>>},
                               39]]},
                            {erlsql,encode,2},
                            {erlsql,'-make_list/2-fun-0-',3},
                            {lists,foldl,3},
                            {erlsql,make_list,2},
                            {erlsql,'-insert/3-fun-2-',1},
                            {erlsql,'-make_list/2-fun-0-',3},
                            {lists,foldl,3}]}}]},
                       {mysql_conn,do_query,5},
                       {erlydb_mysql,update,2},
                       {erlydb_base,'-do_save/1-fun-0-',4},
                       {mysql_conn,do_transaction,2},
                       {mysql_conn,loop,1}]}},
                    {rollback_result,{updated,{mysql_result,[],[],0,
[]}}}}
     in function  erlydb_base:do_save/1
     in call from erlydb_base:hook/4
19>

Could someone give me a pointer on what is wrong and how to
investigate this sort of issue in future?

Thanks

Tom
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"erlyweb" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/erlyweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to