Child vs parent records
Ruslan Zasukhin
sunshine at public.kherson.ua
Mon Nov 14 11:55:34 CST 2005
On 11/14/05 7:15 AM, "Ed Kleban" <Ed at Kleban.com> wrote:
Hi Ed,
* this should be used only for SELF-recursive links
* so image Table "Person".
And Let it have link "Born To" of kind M : M (actually 2 : M)
* let you have record with RecID = 100 and it is person "John Johnson".
this record have linked records.
but look! This linked records are of 2 kinds: Parents and Childs.
So when you do
found = FindLink( 100, tblPerson, tblPerson, ??? )
Who you want to find? Parents or Childs?
Last parameter allow you specify this.
P.S. Hmm... May be in fact we can make MORE functions to make things more
clean...
FindLinked( recid, T1, T2 )
FindLinkedRecursive( recid, T, inRecursionDirection )
> Hi Ruslan,
>
> I've read the description below about the difference between
> kFromParentToChild vs "from child to parent" at least a dozen times and
> just can't figure it out. Can you explain this in some other terms than
> parent/child or define what constitutes a parent vs a child in this context?
> I'm especially confused by the "(s)" in "record(s)" in that I can understand
> a parent record having multiple children by virtue of the the children
> having an ObjectPtr field that identifies the RecID of the Parent. But I
> can't figure out what could possibly be meant by the implication that a
> child record might have more than one parent.
>
> Thanks!
> --Ed
>
>
>
>> FindLinked(
>> inRecID as Integer,
>> inTableA as VTable.
>> inTableB as VTable
>> inRecursionDirection as EVRecursionDirection = kFromParentToChild )
>> as VArraySet
>> Returns the records from inTableB linked to inRecID from inTableA. If zero
>> records are
>> found then returns NIL.
>> For a recursive link you should specify the parameter inRecursionDirection.
>> If
>> you specify
>> kFromParentToChild then the function will use child records of the inRecID
>> record. Other-
>> wise it will use parent record(s) of the inRecID record.
>
--
Best regards,
Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc
Valentina - Joining Worlds of Information
http://www.paradigmasoft.com
[I feel the need: the need for speed]
More information about the Valentina
mailing list