Imagine my chagrin when I saw this line in the output of
user:module_info():
{source,"/ldisk/daily_build/otp_prebuild_r12b.2007-12-04_15/
otp_src_R12B-0/lib/kernel/src/user.erl"}
I'm guessing it would be helpful to _not_ use a module name which
clashes with the OTP provided modules. :-)
I was thinking about cooking up a patch to emit a warning message when
erlydb tries to process a builtin class like this one. Would this be
useful to anyone else?
--Kevin
On Dec 27, 2007, at 8:29 PM, Kevin A. Smith wrote:
>
> Tried this with 0.7 and am still seeing the same problem.
>
> --Kevin
> On Dec 27, 2007, at 11:30 AM, Kevin A. Smith wrote:
>
>>
>> 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
-~----------~----~----~----~------~----~------~--~---