![]() |
Subtype after Creation of Object Type |
Post Reply
|
| Author | |
jfeuser
Member
Joined: 29.Jul.2010 Location: Bremen, Germany Posts: 2 |
Quote Reply
Topic: Subtype after Creation of Object TypePosted: 29.Jul.2010 at 13:47 |
|
Hi,
is there any possibility to make an existing object type (after its creation) a subtype of another one? Or is sub-typing only possible at creation-time? |
|
![]() |
|
jpt
MetaCase
Joined: 25.Mar.2008 Posts: 57 |
Quote Reply
Posted: 29.Jul.2010 at 16:52 |
|
Hi, MetaEdit+ provides two ways for creating metamodels: form-based tools and graphical metamodeling. Form-based tools are the primary ones (see http://www.metacase.com/support/45/manuals/mwb/Mw-2.html#Heading233) emphasizing safety to guarantee that existing models open and work after the metamodel has changed. This comes with the limitation that you identified as form-based tools do not allow to change the supertype.
Graphical metamodeling (see http://www.metacase.com/support/45/manuals/Graphical%20Metamodeling.pdf) allows you to change the supertype (inheritance) but then you are in charge of considering the possible inconsistencies in your existing models. In your case consider for example that a binding constraint set for the supertype would then make some objects (of your current subtype) illegal. Should you delete those illegal ones, update them to another object type before the metamodel change or even change the constraints of the supertype first?
If you have not used graphical metamodeling you may then use plain XML to do the metamodeling work: which is actually a third way for metamodeling. Also graphical metamodeling stores the metamodels in XML before they are imported into MetaEdit+, but you can also export your current metamodel into XML and modify the XML directly and then import it again to MetaEdit+. See see http://www.metacase.com/support/45/manuals/mwb/Mw-7.html#Heading1981 for details.
However, if you don’t have models yet (like instances of your subtype), I personally would prefer creating a new subtype using the form-based tools and then simply reuse all the needed property types (add existing…), and copy the possible symbol definition and constraints given. This would be fastest way too since it takes less than a minute. You may then later hide or remove the unnecessary types or perhaps even use them later for some other purpose.
I hope this helps. |
|
![]() |
|
jfeuser
Member
Joined: 29.Jul.2010 Location: Bremen, Germany Posts: 2 |
Quote Reply
Posted: 30.Jul.2010 at 13:13 |
|
Thank you, that was helpful.
|
|
![]() |
|
Post Reply
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |