MetaCase Homepage
Forum Home Forum Home > > MetaEdit+
  Active Topics Active Topics
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Subtype after Creation of Object Type

 Post Reply Post Reply
Author
Message
  Topic Search Topic Search  Topic Options Topic Options
jfeuser View Drop Down
Member
Member


Joined: 29.Jul.2010
Location: Bremen, Germany
Posts: 2
  Quote jfeuser Quote  Post ReplyReply Direct Link To This Post Topic: Subtype after Creation of Object Type
    Posted: 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?
Back to Top
jpt View Drop Down
MetaCase
MetaCase
Avatar

Joined: 25.Mar.2008
Posts: 57
  Quote jpt Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
jfeuser View Drop Down
Member
Member


Joined: 29.Jul.2010
Location: Bremen, Germany
Posts: 2
  Quote jfeuser Quote  Post ReplyReply Direct Link To This Post Posted: 30.Jul.2010 at 13:13
Thank you, that was helpful.




Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Bulletin Board Software by Web Wiz Forums® version 9.08
Copyright ©2001-2008 Web Wiz

This page was generated in 0.064 seconds.