[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.tools.emf] Simple newbie question: Backreferences?

I need the following:
I want a class A that has references to class B.
B in turn has a reference to class A.

I made a km3-file:

 package somepackage {
  class A {
   attribute aName : String;
   reference bspReferences [*] container : B oppositeOf refDestination;
   reference backDestination [0-1] : B oppositeOf backReference;
  }
  class B {
   attribute bName : String;
   reference refDestination [0-1] : A oppositeOf bspReferences;
   reference backReference container : A oppositeOf backDestination;
  }
 }
 package PrimitiveTypes {
  datatype String;
 }

Then I transformed it into an ecore file, fixed it, made a genmodel and
then an editor.

When I used the editor to make a model for this I noticed that I can't
reference from B back to A.
I have to create a completely new A that is a child of the B.

This really isn't what I wanted.
Is there no way to create a "true" reference, so that, for example, 
one class instance is referenced by more than one other class instance?

If this isn't possible I will have a big problem in the project that I
am working on. :(

-- 
Lehmeier Michael (Nightshade Dragon UDIC)

 8:00 - 12:00 : Frohlocken!
12:00 - 20:00 : Hosianna singen!