Base Object Method Prevents Adding Records

Ruslan Zasukhin sunshine at public.kherson.ua
Sat Oct 23 20:13:20 CDT 2004


On 10/23/04 7:58 PM, "Thomas" <totoole at rocko.lab.csuchico.edu> wrote:

>>> Hi all,
>>> 
>>> The following Base Object Method is causing trouble in VAPP.
>>> 
>>> if(ptr_parent_rcd = ptr_child_rcd,'False',if(ptr_parent_rcd
>>> ptr_child_rcd,concat(ptr_parent_rcd,'-
>>> ',ptr_child_rcd),concat(ptr_child_rcd,'-',ptr_parent_rcd)))
>>> 
>>> It applies to a table with the following fields:
>>> ptr_parent_rcd        (an ObjectPtr to one side of a many to many
>>> join)
>>> ptr_child_rcd        (an ObjectPtr to the other side of the many to
>>> many join)
>>> 
>>> This is a recursive many to many so the target of both ObjectPtrs is
>>> the same, but they point to different RecIDs in the target table.
>> 
>> The first point.
>> 
>> I see that you compare values of ObjectPtrs,
>> I.e. Values of RecID they point to.
>> 
>> This is mistake.
>> 
>> Because if you will delete a record, then its RecID is reused.
> 
> The "On delete" property for both the parent and child ObjectPtrs in
> the lookup table is set to "Cascade". So the ObjectPtrs are deleted
> when the RecIDs they point to are deleted, no? Does this not prevent
> re-use mistakes? Is there a better way to manage these comparisons?

But you compare RecIds !

Why ?

Explain your idea please


You think that PARENT always have less RecID then child ?



-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina mailing list