Hej,

próbuje od dwóch dni stworzyć w ecore, tree-objekt który może sam siebie posiadać jak i posiada referencje od ojca ….
problem wydawał mi się trywialny, niestety w inecie nic nie znalazłem ….

otrzymuje error z którym nie wiem co zrobić ….

"A containment reference of a type with a container feature src: treeobj that requires instances to be contained elsewhere cannot be populated"

ecore kod:

<?xml version="1.0" encoding="UTF-8"?>
<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="test" nsURI="nix" nsPrefix="tst">
  <eClassifiers xsi:type="ecore:EClass" name="root">
    <eStructuralFeatures xsi:type="ecore:EReference" name="myimpls" upperBound="-1"
        eType="#//treeobj" containment="true"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="treeobj">
    <eStructuralFeatures xsi:type="ecore:EReference" name="subs" upperBound="-1" eType="#//treeobj"
        containment="true" eOpposite="#//treeobj/src"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="src" lowerBound="1" eType="#//treeobj"
        derived="true" eOpposite="#//treeobj/subs"/>
  </eClassifiers>
</ecore:EPackage> 

ma ktoś jakiś pomysł ?

Dziekuje z góry !
Maniek