O$ - DAM issue - differences between dev and runtime

Fred Brinkman fred.brinkman at euromnis.org
Tue Apr 7 17:28:35 EDT 2009


Clear... thanks!!

Fred




Fred Brinkman
http://www.euromnis.org

**********************************************
Fred Brinkman Consultancy
B-1000 Brussels

Tel. +32-474-83 80 80
Fax +32-2-330 10 31 (on request)
mailto:fred.brinkman at euromnis.org
*********************************************








Op 7 apr 2009, om 23:22 heeft Bastiaan Olij het volgende geschreven:

> Hey Fred,
>
> Couple of reasons. First of all as it is code in my table base class.
>
> Its an excelent place to do some final data additions such as setting
> creation/modified dates, columns to indicate which user has made the
> change, etc. (these columns have standard naming conventions). I also
> have some code that does some final conversion to account for
> differences between Omnis and my backend (making sure dates are NULL
> instead of empty for instance). I can also audit my changes here if  
> that
> is needed or atleast have my default auditing logic in my base class.
>
> Then for those backends that do not support autonumbering primary  
> keys,
> in my $insert I assign a unique value to the primary key. For those
> backends that do support autonumbering, I retrieve the newly generated
> number at the end of the $insert.
>
> The $delete I generally leave alone though.
>
> Greetz,
>
> Bas
>
> Fred Brinkman wrote:
>> Bas,
>>
>> What's your main reason for overriding $insert, $update (and, I
>> assume, $delete).
>> When your data is prepared in advance, is there any reason to do  
>> this?
>>
>> Just curious,
>>
>> Fred.
>>
>>
>>
>>
>>
>> Fred Brinkman
>> http://www.euromnis.org
>>
>> **********************************************
>> Fred Brinkman Consultancy
>> B-1000 Brussels
>>
>> Tel. +32-474-83 80 80
>> Fax +32-2-330 10 31 (on request)
>> mailto:fred.brinkman at euromnis.org
>> *********************************************
>>
>>
>>
>>
>>
>>
>>
>>
>> Op 7 apr 2009, om 22:50 heeft Bastiaan Olij het volgende geschreven:
>>
>>> Hmmm,
>>>
>>> Maybe I mixed them up the wrong way around... It has been awhile and
>>> these days I override $insert and $update all together with my own  
>>> code.
>>> Sorry about that,
>>>
>>> Bastiaan
>>>
>>> Steve Finger wrote:
>>>> Hi,
>>>>
>>>> Now I'm confused. In my table classes I override $update all the  
>>>> time
>>>> and at the end put
>>>>
>>>> Do default Returns %flag
>>>>
>>>> %flag is a local variable and it returns 1 if successful and 0 if  
>>>> not
>>>>
>>>> In my only experience with Oracle and SQL Server the Do default  
>>>> works
>>>> the same with the 0 or 1 result.
>>>>
>>>> I think (but I'm going from memory) there may have been a time it
>>>> returned null from an sql statement that ended up being totally  
>>>> messed
>>>> up and I guess the Dam didn't know what to do with it.
>>>>
>>>> Steve Finger
>>>>
>>>> Bastiaan Olij wrote:
>>>>> Hi David,
>>>>>
>>>>> As you are overrriding $update, do default is not the correct  
>>>>> way to
>>>>> invoke the standard logic.
>>>>>
>>>>> Try either doing a "do inherited" or what I find easier/better  
>>>>> myself:
>>>>> do $inherited.$update() returns lvSuccess
>>>>>
>>>>> Which allows you to parse any additional parameters.
>>>>>
>>>>> I can't remember off the top of my head when you had to use do
>>>>> default.
>>>>> I hardly use that one in my code.
>>>>>
>>>>> Greetz,
>>>>>
>>>>> Bas
>>>>>
>>>>> David Walton wrote:
>>>>>> Okay... no responses. Let's try again.
>>>>>>
>>>>>> I have a table method that is called $update. It processes some
>>>>>> history, checks that the user has changed some values, then  
>>>>>> says  "Do
>>>>>> default" with a return value. The problem is that I get different
>>>>>> results from the return value on the do default in runtime than  
>>>>>> in
>>>>>> development.
>>>>>>
>>>>>> Can someone tell me what I should expect from the return value on
>>>>>> a do
>>>>>> default? Is it boolean, numeric, etc? It seems to be returning a
>>>>>> blank
>>>>>> (like '').
>>>>>>
>>>>>> Thanks.
>>>>>>
>>>>>
>>>>> _____________________________________________________________
>>>>> Manage your list subscriptions at http://lists.omnis-dev.com
>>>> _____________________________________________________________
>>>> Manage your list subscriptions at http://lists.omnis-dev.com
>>>>
>>>
>>>
>>> -- 
>>> Kindest Regards,
>>>
>>> Bastiaan Olij
>>> e-mail/MSN: bastiaan at basenlily.nl
>>> web: http://www.basenlily.nl
>>> Skype: Mux213
>>> http://www.linkedin.com/in/bastiaanolij
>>>
>>> _____________________________________________________________
>>> Manage your list subscriptions at http://lists.omnis-dev.com
>>
>> _____________________________________________________________
>> Manage your list subscriptions at http://lists.omnis-dev.com
>>
>
>
> -- 
> Kindest Regards,
>
> Bastiaan Olij
> e-mail/MSN: bastiaan at basenlily.nl
> web: http://www.basenlily.nl
> Skype: Mux213
> http://www.linkedin.com/in/bastiaanolij
>
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com




More information about the omnisdev-en mailing list