cancel
Showing results for 
Search instead for 
Did you mean: 

Error when creating a new meta Association between 2 metaclasses

SOLVED
Highlighted
Contributor

Error when creating a new meta Association between 2 metaclasses

Hello,

 

I want to add a new metaAssociation  between 2 MetaClasses : Attribut(MD) and Sequence.It works well but when i'm going to the property page of  an Attribut(MD), i've got this message :

 

Thread(04d4);.\bdocccurs.cpp(119) : error Private: 0x00008012 14:04:13
              Invalid definition of "Attribut (MD).GIP-Séquence", you need to connect a macro
               to this MetaAssociation

 

I think the problem is that there is macro on the MetaClasse Attribut(MD) to generate SQL code but I don't want to generate anything about  Sequence.

I just want to see the Sequence items on the complement part of an Attribute(MD)

is there any options to check  to avoid this error ?Screenshot joined

 

4 REPLIES
MEGA

Re: Error when creating a new meta Association between 2 metaclasses

Hello sgonthey

 

The MetaAssociation you want to create is involving a MetaClass (Attribute (MD)) that is part of the data modeling metamodel.

Data modeling metamodel has a specific implementation.

 

It is therefore necessary to follow a specific procedure to extend this metamodel

See this KB http://community.mega.com/t5/custom/page/page-id/mega-kb-solution?sid=50120000000mqi7AAA

 

Note that you could have retrieved this KB from the search in the knowledge base tab of the MEGA Community (search with the error message (here 'you need to connect a macro to this MetaAssociation')

Jerome
Contributor

Re: Error when creating a new meta Association between 2 metaclasses

Thanks for your response, I'm going to try this method today

 

Sandrine

Contributor

Re: Error when creating a new meta Association between 2 metaclasses

Hello,

 

I follow all the KB instructions but I don't see  the Sequence in the complement Tab of an Attribut (MD)

I have a question :
In the KB subject :

  • Create a MetaAssociation between 'Class' and 'MyClass' (persistance)<==
  • Create a MetaAssociation between 'Entity (DM)' and 'MyClass' (virtual).

Where do I  put the value Persitance  or Abstract on  the MetaAssociation ? Is the value  of MetaLayer  ( Abstract or Metamodel )?

 

Different ScreenShort are joined , perhaps I  forget  something ...

Thanks for your help

 

 

 

MEGA

Re: Error when creating a new meta Association between 2 metaclasses

There is no need to change the metalayer here

Let me rephrase the procedure

 

Example: the need is to add a MetaAssociation between the MetaClass 'Entity (DM)' (standard metamodel) and the MetaClass 'MyClass_EXT' (metamodel extension).
'_EXT' is the suffix used by the project for metamodel extensions.

 

Procedure:

- Create a MetaAssociation between 'Entity (DM)' and 'MyClass_EXT'

Ex: 'Entity (DM)/MyClass_EXT'
This is the expected MetaAssociation.
It has 2 MetAssociationEnds: [Entity (DM).MyClass_EXT] and [MyClass_EXT.Entity (DM)_EXT]
- Create a MetaAssociation between 'Class' and 'MyClass_EXT'
This MetaAssociation is technically required to manage the persistance (physical level).
 It has 2 MetAssociationEnds: [Class.MyClass_EXT] and [MyClass_EXT.Class_EXT]
- Connect the MetaAssociation (ex: 'Entity (DM)/MyClass_EXT') to the Macro 'FilteredMetaAssociation' using the 'Macro' link. - Map every MetaAssociationEnd of the virtual MetaAssociation to a MetaAssociationEnd of the persistent MetaAssociation using the 'MetaAssociationEnd (Physical)' link.
Ex:
Map [Entity (DM).MyClass_EXT] with [Class.MyClass_EXT] using the 'MetaAssociationEnd (Physical)' link
Map [MyClass_EXT.Entity (DM)_EXT] with [MyClass_EXT.MyClass_EXT] using the 'MetaAssociationEnd (Physical)' link 

Jerome