' used in the model fil...">

Differences between the "o" symbol and the arrow used in a .cto file?

I am a little confused between the 'o' and the '->' used in the model file, for example:

asset Field identified by assetId {
    o String assetId
    o Customer owner
    --> Customer custId
}

participant Customer identified by customerId {
    o String customerId
} 

      

What is the difference between "o Client owner" and "-> Client custId"?

+3


source to share


1 answer


o

indicates that this is a property of the o

wned class. Aka "field". This means that when an instance of a class is deleted, all of its properties.

-->

indicates that this is a relation to another referenced resource. Aka pointer or primary / foreign key relationship.

In your example, your resource Field

has a property or type Customer

called owner. When the instances Field

are deleted, the instances Customer

they hold in the owner property are also deleted.

The attribute Field

also has to do with the instance Customer

stored in the property custId

. Deleting an instance of a field will not delete the instance Customer

that the link points to.



Composers' ratios are typical pointers. They represent the fully qualified name of the resource type they are pointing to, as well as the identified instance they are pointing to.

There is no cascading deletion in composer relationships, and there is no referential integrity checking for relationships. It is up to the application to check if the resource that is at the end of the relationship exists or not and respond accordingly.

Please note that in the future we may prevent use o

with assets and members. It really doesn't make a lot of sense and confuses people who expect to find them in their respective registries. For assets and members, people must use -->

.

+6


source







All Articles