Hi Julio,

Have you looked at:
http://doc.4d.com/4Dv17/4D/17/dataClassAttributerelatedDataClass.303-3884018.en.html

Relation attributes have 3-properties:
1) kind
2) name
3) relatedDataClass

The "kind" property tells you the type of relation: one or many.
The "name" property is the name you assign in the 4D Relation Inspector.
The "relatedDataClass" identifies the name of the related table.

Try creating 2-tables with a one-to-many relation. Say "Owner" (one table) and 
"Item" (many table.)
In the Relation Inspector, name the relations:

Many to one as "theOwner"
One to many as "theItems"

Don't forget to restart 4D before examining in the Debugger. With ORDA, any 
structure change requires restarting 4D to be recognized.

In the debugger's expression pane, examine the DataClass for each table.

ds.Owner
ds.Item

The relation attributes will look something like this:

ds.Item.theOwner shows this value:
{name:theOwner,kind:relatedEntity,relatedDataClass:Owner}

ds.Owner.theItems shows this value:
{name:theItems,kind:relatedEntities,relatedDataClass:Item}

Note the relation type (relatedEntity OR relatedEntities) is identified along 
with the name of the related table (Owner OR Item).

Does this info help?

- Jeremy


> On Jul 31, 2018, at 4:10 AM, Julio Carneiro via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> …that only tells me I have a relation attribute and that relation’s name. It 
> does not tell me if it is a relations between A and B, or A and C.
> Is there a way to get that?

**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to