Objects collection
Printed From: MetaCase
Category:
Forum Name: MetaEdit+
Forum Description: All topics relating to MetaEdit+ or DSM
URL: https://www.metacase.com/forums/forum_posts.asp?TID=869
Printed Date: 27.Mar.2026 at 03:35 Software Version: Web Wiz Forums 12.05 - http://www.webwizforums.com
Topic: Objects collection
Posted By: Saivignesh
Subject: Objects collection
Date Posted: 10.May.2017 at 14:38
|
I have object A and object B. Is it possible to have a property of an Object C which is a collection of Object A and Object B?
|
Replies:
Posted By: jpt
Date Posted: 10.May.2017 at 15:00
Yes, if they are in the same type hierarchy. You could also have one abstract type '_Object' as supertype for Object A and Object B and then use that abstract type in the collection.
In some exceptional circumstances it may be desirable to specify the supertype of all the types of that metatype, e.g. Object: you can do this by selecting the metatype from the pull-down list with shift held down, and that metatype will then be included in the list of types to select from. For details see http://www.metacase.com/support/55/manuals/mwb/Mw-2_6_3.html#Heading506" rel="nofollow - Collection properties .
For an example, see in demo repository 'EAST-ADL' project and there definition of 'FeatureFlaw' object type. It has a collection property 'nonFullFilledRequirements' that refers to hierarchy (of requirements).
|
Posted By: Saivignesh
Date Posted: 10.May.2017 at 15:17
|
Object A and Object B are separate objects. Is it possible then?
|
Posted By: jpt
Date Posted: 10.May.2017 at 19:27
|
Yes, if they are in the same type hierarchy, e.g. Object A is supertype of B, or they have common supertype. Supertype would be then the item of the collection. For subtyping please see also discussion on http://www.metacase.com/forums/subtype-after-creation-of-object-type_topic161.html?KW=hierarchy" rel="nofollow - subtyping after creation of Object Type .
|
|