Do I need to do anything special in my module definition to get ErlyDb  
to use my custom before_save/1 implementation? I'm using erlyweb 0.6.2  
and the function doesn't get called when I save the record:

6> U = user:new_with([{first_name, "foo"}, {last_name, "bar"},  
{password, "abcdef"}, {userid, "fbar"}]).
{user,true,undefined,"foo","bar","fbar","abcdef",undefined}
7> U1 = user:save(U).
{user,false,24,"foo","bar","fbar","abcdef",undefined}
8> U1.
{user,false,24,"foo","bar","fbar","abcdef",undefined}
9> q().

The user module looks like this:

-module(user).

-export([relations/0, before_save/1]).

relations() ->
     [{one_to_many, [email_address]}].

before_save(Me) ->
     io:format("before_save/1 called~n").

Pointers? Ideas?

Thanks,
Kevin

--~--~---------~--~----~------------~-------~--~----~
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