« Return to Thread: beforeInsert event problem

Re: beforeInsert event problem

by Marc Palmer Local :: Rate this Message:

Reply to Author | View in Thread


On 24 Apr 2008, at 14:38, Peter Ledbrook wrote:

>>    // Init the unique token
>>    def beforeInsert = {
>>        println "invoking beforeInsert - conf token is  
>> [$confirmationToken]"
>>        makeToken()
>>        println "after beforeInsert - conf token is  
>> [$confirmationToken]"
>>    }
>
> What happens if you replace the "makeToken()" line with
> "confirmationToken = 'something'"?
>
>> Then the output from the test is:
>>
>> invoking beforeInsert - conf token is [?]
>> after beforeInsert - conf token is [?]
>
> But what's in the database?


Not sure, running in memory and haven't had time to explore. However  
the property was definitely being left as ? because the data was then  
used to send an email and the token was ? ... which started the whole  
sorry tale of how beforeInsert is b0rked in 1.0.2 :)

I had to give up completely on using an event, it just isn't working.  
Code has to go live today...

Marc

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


 « Return to Thread: beforeInsert event problem

LightInTheBox - Buy quality products at wholesale price