Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Teneo] Cannot add an item to a HibernatePersistableEList
[Teneo] Cannot add an item to a HibernatePersistableEList [message #77007] Thu, 29 March 2007 08:48 Go to next message
Markus Bischof is currently offline Markus BischofFriend
Messages: 72
Registered: July 2009
Member
This is a multi-part message in MIME format.

------=_NextPart_000_0023_01C771EF.D2F03AF0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi!

I've managed to load and save HibernateResource-Objects, but now I want =
to add some items to that resource using an AddCommand =
(org.eclipse.emf.edit.command.AddCommand), which calls (in my case) the =
method "addAll(collection)" of the HibernatePersistableEList-object =
(ownerList) (line 400). The "collection" contains only one object. This =
method runs until the call "notifications =3D inverseAdd(value, =
notifications)" (line 439) which throws an exception.

After some debugging I found the error in the BasicEObjectImpl.class of =
the one object contained in the "collection". It calls =
"newResource.attached(this)" in line 912 (newResource is a =
HibernateResource) which then calls the =
"eObject.eContainmentFeature()"-method. This method runs until line 459, =
460 an then tries to execute the following code:

FeatureMap featureMap =3D (FeatureMap)eContainer.eGet(eFeature);
for (int i =3D 0, size =3D featureMap.size(); i < size; ++i) {...}

But in my case, the method eContainer.eGet(eFeature) returns null or a =
string-object, but in no case a FeatureMap. (More information: eFeature =
is an EAttributeImpl-class and has as name "name", which means that the =
name of the eContainer should be resolved, at least I think so!)

Do I have to change my implementation so that it returns some FeatureMap =
(I actually don't know what that map should contain!) or is there =
something wrong with the HibernatePersistableEList-object?

I hope this is not too technical!

Markus Bischof
------=_NextPart_000_0023_01C771EF.D2F03AF0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.6000.16414" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff background=3D"">
<DIV><FONT face=3DArial size=3D2>Hi!<BR><BR>I've managed to load and =
save=20
HibernateResource-Objects, but now I want to add some items to that =
resource=20
using an AddCommand (org.eclipse.emf.edit.command.AddCommand), which =
calls (in=20
my case) the method "addAll(collection)" of the =
HibernatePersistableEList-object=20
(ownerList) (line 400). The "collection" contains only one object. This =
method=20
runs until the call "</FONT><FONT face=3DArial size=3D2>notifications =
=3D=20
inverseAdd(value, notifications)" (line 439) which throws an=20
exception.</FONT><BR><BR><FONT face=3DArial size=3D2>After some =
debugging I found=20
the error in the BasicEObjectImpl.class of the one object contained in =
the=20
"collection". It calls "newResource.attached(this)" in line 912 =
(newResource is=20
a HibernateResource) which then calls the=20
"eObject.eContainmentFeature()"-method. This method runs until line 459, =
460 an=20
then tries to execute the following code:<BR><BR>FeatureMap featureMap =
=3D=20
(FeatureMap)eContainer.eGet(eFeature);<BR>for (int i =3D 0, size =3D=20
featureMap.size(); i &lt; size; ++i) {...}</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>But in my case, the method=20
eContainer.eGet(eFeature) returns null or a string-object, but in no =
case a=20
FeatureMap. (More information: eFeature is an EAttributeImpl-class and =
has as=20
name "name", which means that the name of the eContainer should be =
resolved, at=20
least I think so!)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Do I have to change my implementation =
so that it=20
returns some FeatureMap (I actually don't know what that map should =
contain!) or=20
is there something wrong with the =
HibernatePersistableEList-object?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I hope this is not too =
technical!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Markus =
Bischof</FONT></DIV></BODY></HTML>

------=_NextPart_000_0023_01C771EF.D2F03AF0--
Re: [Teneo] Cannot add an item to a HibernatePersistableEList [message #77019 is a reply to message #77007] Thu, 29 March 2007 08:59 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5339
Registered: July 2009
Senior Member
Hi Markus,
Is the object on which eContainmentFeature is called a new object or an object loaded from the db?

gr. Martin

Markus Bischof wrote:
> Hi!
>
> I've managed to load and save HibernateResource-Objects, but now I want
> to add some items to that resource using an AddCommand
> (org.eclipse.emf.edit.command.AddCommand), which calls (in my case) the
> method "addAll(collection)" of the HibernatePersistableEList-object
> (ownerList) (line 400). The "collection" contains only one object. This
> method runs until the call "notifications = inverseAdd(value,
> notifications)" (line 439) which throws an exception.
>
> After some debugging I found the error in the BasicEObjectImpl.class of
> the one object contained in the "collection". It calls
> "newResource.attached(this)" in line 912 (newResource is a
> HibernateResource) which then calls the
> "eObject.eContainmentFeature()"-method. This method runs until line 459,
> 460 an then tries to execute the following code:
>
> FeatureMap featureMap = (FeatureMap)eContainer.eGet(eFeature);
> for (int i = 0, size = featureMap.size(); i < size; ++i) {...}
>
> But in my case, the method eContainer.eGet(eFeature) returns null or a
> string-object, but in no case a FeatureMap. (More information: eFeature
> is an EAttributeImpl-class and has as name "name", which means that the
> name of the eContainer should be resolved, at least I think so!)
>
> Do I have to change my implementation so that it returns some FeatureMap
> (I actually don't know what that map should contain!) or is there
> something wrong with the HibernatePersistableEList-object?
>
> I hope this is not too technical!
>
> Markus Bischof


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: [Teneo] Cannot add an item to a HibernatePersistableEList [message #77027 is a reply to message #77019] Thu, 29 March 2007 09:36 Go to previous messageGo to next message
Markus Bischof is currently offline Markus BischofFriend
Messages: 72
Registered: July 2009
Member
Hi!

It's a new object and it doesn't come from the database. (In my case it's an
ActionImpl.).

Markus
Re: [Teneo] Cannot add an item to a HibernatePersistableEList [message #77032 is a reply to message #77027] Thu, 29 March 2007 09:48 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5339
Registered: July 2009
Senior Member
Hi Markus,
What happens if you call eContainmentFeature() on the object yourselve (so without adding it to
anything)?
If it fails then I assume that the featureid's of your the efeatures of different types in your
generated classes are not in sync. You can try to regenerate all the code (for all the packages).

gr. Martin

Markus Bischof wrote:
> Hi!
>
> It's a new object and it doesn't come from the database. (In my case it's an
> ActionImpl.).
>
> Markus
>
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: [Teneo] Cannot add an item to a HibernatePersistableEList [message #77036 is a reply to message #77032] Thu, 29 March 2007 09:59 Go to previous messageGo to next message
Markus Bischof is currently offline Markus BischofFriend
Messages: 72
Registered: July 2009
Member
I just executed

Action impl = ProcessesFactory.eINSTANCE.createAction();
Object o = impl.eContainingFeature();

and I get no exception. o is null.
Re: [Teneo] Cannot add an item to a HibernatePersistableEList [message #77039 is a reply to message #77036] Thu, 29 March 2007 10:06 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5339
Registered: July 2009
Senior Member
You have to do: eContainmentFeature()
and probably on the object which you are using in the addAll call you mentioned earlier. It needs to
be filled with some data.

Is the parent to which you are adding the object new or is it loaded from the db?

gr. Martin

Markus Bischof wrote:
> I just executed
>
> Action impl = ProcessesFactory.eINSTANCE.createAction();
> Object o = impl.eContainingFeature();
>
> and I get no exception. o is null.
>
>
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: [Teneo] Cannot add an item to a HibernatePersistableEList [message #77041 is a reply to message #77039] Thu, 29 March 2007 10:23 Go to previous messageGo to next message
Markus Bischof is currently offline Markus BischofFriend
Messages: 72
Registered: July 2009
Member
This is a multi-part message in MIME format.

------=_NextPart_000_003B_01C771FD.13F86920
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Oh...sorry...

Well, it is a bit difficult to get to that point before the =
hibernateResource.attached(this) call, but I managed to get there.

I just added this.eContainmentFeature(); before the attached-call and =
there is also an exception (it's the same with the FeatureMap).

The parent (I think that has to be the container) is from the database =
(ActivityImpl).

Markus
------=_NextPart_000_003B_01C771FD.13F86920
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.6000.16414" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>Oh...sorry...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Well, it is a bit difficult to get to =
that point=20
before the hibernateResource.attached(this) call, but I managed to get=20
there.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I just added t</FONT><FONT face=3DArial =

size=3D2>his.eContainmentFeature(); before the attached-call and there =
is also an=20
exception (it's the same with the FeatureMap).</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT><FONT face=3DArial =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>The parent (I think that has to be the =
container)=20
is from the database (ActivityImpl).</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Markus</FONT></DIV></BODY></HTML>

------=_NextPart_000_003B_01C771FD.13F86920--
Re: [Teneo] Cannot add an item to a HibernatePersistableEList [message #77112 is a reply to message #77041] Thu, 29 March 2007 10:30 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5339
Registered: July 2009
Senior Member
Can you create a parent, fill it with some data, and then add a child to it in the same way as you
do now? Only without loading the parent from the database (so a new parent) and then call this
method afterwards? To see if it fails.

gr. Martin

Markus Bischof wrote:
> Oh...sorry...
>
> Well, it is a bit difficult to get to that point before the
> hibernateResource.attached(this) call, but I managed to get there.
>
> I just added this.eContainmentFeature(); before the attached-call and
> there is also an exception (it's the same with the FeatureMap).
>
> The parent (I think that has to be the container) is from the database
> (ActivityImpl).
>
> Markus


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: [Teneo] Cannot add an item to a HibernatePersistableEList [message #77133 is a reply to message #77112] Thu, 29 March 2007 10:51 Go to previous messageGo to next message
Markus Bischof is currently offline Markus BischofFriend
Messages: 72
Registered: July 2009
Member
Yes I can.

The editor I'm using can load resource from a file (using XMIResources).
When I add a new item to such a resource, I get to the same point, but the
eContainerFeatureID is different. When I add an item (as said: ActionImpl)
to a model from a XMIResource, the eContainerFeatureID is -5, but when I
load a model from the database an do the same thing, die eContainerFeatureID
is -2. I think that could be the problem.

Here you see the code from the BasicEObjectImpl.class where the exception is
thrown. The line (*) gibes a different result for the eFeature when I'm
using a container from the database, and then line (**) throws an excption.



protected static EReference eContainmentFeature(EObject eObject, EObject
eContainer, int eContainerFeatureID)
{
if (eContainer == null)
{
return null;
}
else
{
if (eContainerFeatureID <= EOPPOSITE_FEATURE_BASE)
{
(*) EStructuralFeature eFeature =
eContainer.eClass().getEStructuralFeature(EOPPOSITE_FEATURE_ BASE -
eContainerFeatureID);
if (eFeature instanceof EReference)
{
return (EReference)eFeature;
}
else
{
(**) FeatureMap featureMap =
(FeatureMap)eContainer.eGet(eFeature);
for (int i = 0, size = featureMap.size(); i < size; ++i)
{
.....
Re: [Teneo] Cannot add an item to a HibernatePersistableEList [message #77149 is a reply to message #77133] Thu, 29 March 2007 11:04 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5339
Registered: July 2009
Senior Member
To be sure, is the object (a child) which has econtainerfeatureid -2 a new object (not yet
persisted) or is it an object which has been loaded from the db also (together with its parent)?

gr. Martin

Markus Bischof wrote:
> Yes I can.
>
> The editor I'm using can load resource from a file (using XMIResources).
> When I add a new item to such a resource, I get to the same point, but the
> eContainerFeatureID is different. When I add an item (as said: ActionImpl)
> to a model from a XMIResource, the eContainerFeatureID is -5, but when I
> load a model from the database an do the same thing, die eContainerFeatureID
> is -2. I think that could be the problem.
>
> Here you see the code from the BasicEObjectImpl.class where the exception is
> thrown. The line (*) gibes a different result for the eFeature when I'm
> using a container from the database, and then line (**) throws an excption.
>
>
>
> protected static EReference eContainmentFeature(EObject eObject, EObject
> eContainer, int eContainerFeatureID)
> {
> if (eContainer == null)
> {
> return null;
> }
> else
> {
> if (eContainerFeatureID <= EOPPOSITE_FEATURE_BASE)
> {
> (*) EStructuralFeature eFeature =
> eContainer.eClass().getEStructuralFeature(EOPPOSITE_FEATURE_ BASE -
> eContainerFeatureID);
> if (eFeature instanceof EReference)
> {
> return (EReference)eFeature;
> }
> else
> {
> (**) FeatureMap featureMap =
> (FeatureMap)eContainer.eGet(eFeature);
> for (int i = 0, size = featureMap.size(); i < size; ++i)
> {
> .....
>
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: [Teneo] Cannot add an item to a HibernatePersistableEList [message #77164 is a reply to message #77149] Thu, 29 March 2007 11:11 Go to previous messageGo to next message
Markus Bischof is currently offline Markus BischofFriend
Messages: 72
Registered: July 2009
Member
It is a new object, which is not yet persisted.

e.g. when I have an empty model loaded from database, and I'm try to add a
new item. The eContainerFeatureID of the new item is -2 !

When I do the same thing using a XMIResource to load an empty model from the
filesystem, the eContainerFeatureID of the new item is -5 !
Re: [Teneo] Cannot add an item to a HibernatePersistableEList [message #77180 is a reply to message #77164] Thu, 29 March 2007 11:20 Go to previous messageGo to next message
Markus Bischof is currently offline Markus BischofFriend
Messages: 72
Registered: July 2009
Member
Unfortunately there is no effect when I set the value of that item to -5 in
debugmode!
Re: [Teneo] Cannot add an item to a HibernatePersistableEList [message #77195 is a reply to message #77164] Thu, 29 March 2007 11:35 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5339
Registered: July 2009
Senior Member
Can you set a breakpoint in the method: eBasicSetContainer of EObjectImpl and see how it is set when
you add the new object to the list?
I am interested in the stacktrace.

gr. Martin

Markus Bischof wrote:
> It is a new object, which is not yet persisted.
>
> e.g. when I have an empty model loaded from database, and I'm try to add a
> new item. The eContainerFeatureID of the new item is -2 !
>
> When I do the same thing using a XMIResource to load an empty model from the
> filesystem, the eContainerFeatureID of the new item is -5 !
>
>
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: [Teneo] Cannot add an item to a HibernatePersistableEList [message #77210 is a reply to message #77164] Thu, 29 March 2007 11:47 Go to previous messageGo to next message
Markus Bischof is currently offline Markus BischofFriend
Messages: 72
Registered: July 2009
Member
Yes...I did this and discovered that it comes from the
DelegatinECoreEList.class from the method inverseAdd, where the method
getFeatureID() (*) is called. In the case of a model loaded from file
system, the getFeatureID() method is called upon an EObjectContainmentEList
which returns 4, and when I load the model from the database, the
getFeatureID() method is called upon a PersistableEList, which returns
estructuralFeature.getFeatureID() (which is 1).

public NotificationChain inverseAdd(Object object, NotificationChain
notifications)
{
InternalEObject internalEObject = (InternalEObject) object;
if (hasNavigableInverse())
{
if (!hasInstanceClass())
{
return
internalEObject.eInverseAdd
(owner,
internalEObject.eClass().getFeatureID(getInverseEReference() ),
null,
notifications);
}
else
{
return
internalEObject.eInverseAdd
(owner,
getInverseFeatureID(),
getInverseFeatureClass(),
notifications);
}
}
else
{
return
internalEObject.eInverseAdd
(owner,
InternalEObject.EOPPOSITE_FEATURE_BASE - getFeatureID(),
(*)
null,
notifications);
}
}
Re: [Teneo] Cannot add an item to a HibernatePersistableEList [message #77226 is a reply to message #77210] Thu, 29 March 2007 11:53 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5339
Registered: July 2009
Senior Member
Can you see what the estructuralfeature of the PersistableEList is (is it the eattribute)?
and when you call getEStructuralFeature on the EObjectContainmentEList?

gr. Martin

Markus Bischof wrote:
> Yes...I did this and discovered that it comes from the
> DelegatinECoreEList.class from the method inverseAdd, where the method
> getFeatureID() (*) is called. In the case of a model loaded from file
> system, the getFeatureID() method is called upon an EObjectContainmentEList
> which returns 4, and when I load the model from the database, the
> getFeatureID() method is called upon a PersistableEList, which returns
> estructuralFeature.getFeatureID() (which is 1).
>
> public NotificationChain inverseAdd(Object object, NotificationChain
> notifications)
> {
> InternalEObject internalEObject = (InternalEObject) object;
> if (hasNavigableInverse())
> {
> if (!hasInstanceClass())
> {
> return
> internalEObject.eInverseAdd
> (owner,
> internalEObject.eClass().getFeatureID(getInverseEReference() ),
> null,
> notifications);
> }
> else
> {
> return
> internalEObject.eInverseAdd
> (owner,
> getInverseFeatureID(),
> getInverseFeatureClass(),
> notifications);
> }
> }
> else
> {
> return
> internalEObject.eInverseAdd
> (owner,
> InternalEObject.EOPPOSITE_FEATURE_BASE - getFeatureID(),
> (*)
> null,
> notifications);
> }
> }
>
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: [Teneo] Cannot add an item to a HibernatePersistableEList [message #77242 is a reply to message #77226] Thu, 29 March 2007 12:05 Go to previous messageGo to next message
Markus Bischof is currently offline Markus BischofFriend
Messages: 72
Registered: July 2009
Member
Hm...it's a org.eclipse.emf.ecore.impl.EReferenceImpl-object. Now here's
what I found out:

The EObjectContainmentEList returns only a local field for the featureID.
The value of that field is 4, but when I use a watch-expression to get the
EStructuralFeature, I also get an object of type
org.eclipse.emf.ecore.impl.EReferenceImpl, which has 1 for the featureID
value!

The PersistableEList doesn't return a local field but it makes the call
eStructuralFeature.getFeatureID() which then returns 1 (I think if the
EObjectContainmentEList would make that call, too, it would return 1!

Markus
Re: [Teneo] Cannot add an item to a HibernatePersistableEList [message #77258 is a reply to message #77242] Thu, 29 March 2007 12:15 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

This is a multi-part message in MIME format.
--------------010209050308090506050701
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Markus,

I haven't followed this whole chain closely, but it's important to keep
in mind that a feature's ID with respect to the actual EClass of the
EObject instance with that feature is the index within that EClass' list
of eAllStructuralFeatures so with multiple inheritance, that means the
ID of the feature with respect to a particular EClass may not be the
same as the ID with respect to the EClass that defines the feature.
Here's how the ID is computed with respect to any particular EClass:

public int getFeatureID(EStructuralFeature feature)
{
EStructuralFeature [] eAllStructuralFeaturesData =
getEAllStructuralFeaturesData();
int index = feature.getFeatureID();
if (index != -1)
{
for (int last = eAllStructuralFeaturesData.length; index <
last; ++index)
{
if (eAllStructuralFeaturesData[index] == feature)
{
return index;
}
}
}
return -1;
}

In the case of single inheritance, the first if within the for loop will
find it. There was a recent bug fix related to this,
https://bugs.eclipse.org/bugs/show_bug.cgi?id=175386, so hopefully
that's not a factor in this issue.


Markus Bischof wrote:
> Hm...it's a org.eclipse.emf.ecore.impl.EReferenceImpl-object. Now here's
> what I found out:
>
> The EObjectContainmentEList returns only a local field for the featureID.
> The value of that field is 4, but when I use a watch-expression to get the
> EStructuralFeature, I also get an object of type
> org.eclipse.emf.ecore.impl.EReferenceImpl, which has 1 for the featureID
> value!
>
> The PersistableEList doesn't return a local field but it makes the call
> eStructuralFeature.getFeatureID() which then returns 1 (I think if the
> EObjectContainmentEList would make that call, too, it would return 1!
>
> Markus
>
>
>


--------------010209050308090506050701
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Markus,<br>
<br>
I haven't followed this whole chain closely, but it's important to keep
in mind that a feature's ID with respect to the actual EClass of the
EObject instance with that feature is the index within that EClass'
list of eAllStructuralFeatures so with multiple inheritance, that means
the ID of the feature with respect to a particular EClass may not be
the same as the ID with respect to the EClass that defines the
feature.&nbsp; Here's how the ID is computed with respect to any particular
EClass:<br>
<blockquote><small>&nbsp; public int getFeatureID(EStructuralFeature feature)<br>
&nbsp; {<br>
&nbsp;&nbsp;&nbsp; EStructuralFeature [] eAllStructuralFeaturesData&nbsp; =
getEAllStructuralFeaturesData();<br>
&nbsp;&nbsp;&nbsp; int index = feature.getFeatureID();<br>
&nbsp;&nbsp;&nbsp; if (index != -1)<br>
&nbsp;&nbsp;&nbsp; {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for (int last = eAllStructuralFeaturesData.length; index &lt;
last; ++index)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; if (eAllStructuralFeaturesData[index] == feature)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return index;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; }<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>
&nbsp;&nbsp;&nbsp; }<br>
&nbsp;&nbsp;&nbsp; return -1;<br>
&nbsp; }</small><br>
</blockquote>
In the case of single inheritance, the first if within the for loop
will find it.&nbsp; There was a recent bug fix related to this, <a
href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=175386">https://bugs.eclipse.org/bugs/show_bug.cgi?id=175386</a>,
so hopefully that's not a factor in this issue.<br>
<br>
<br>
Markus Bischof wrote:
<blockquote cite="mideuga1r$gnt$1@build.eclipse.org" type="cite">
<pre wrap="">Hm...it's a org.eclipse.emf.ecore.impl.EReferenceImpl-object. Now here's
what I found out:

The EObjectContainmentEList returns only a local field for the featureID.
The value of that field is 4, but when I use a watch-expression to get the
EStructuralFeature, I also get an object of type
org.eclipse.emf.ecore.impl.EReferenceImpl, which has 1 for the featureID
value!

The PersistableEList doesn't return a local field but it makes the call
eStructuralFeature.getFeatureID() which then returns 1 (I think if the
EObjectContainmentEList would make that call, too, it would return 1!

Markus


</pre>
</blockquote>
<br>
</body>
</html>

--------------010209050308090506050701--
Re: [Teneo] Cannot add an item to a HibernatePersistableEList [message #77274 is a reply to message #77242] Thu, 29 March 2007 12:25 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5339
Registered: July 2009
Senior Member
Okay, can you check in the Impl class of the parent object which featureid is passed when the
EObjectContainmentList is created?
Can post that construction code? (the new EObjectContain.....)

gr. Martin

Markus Bischof wrote:
> Hm...it's a org.eclipse.emf.ecore.impl.EReferenceImpl-object. Now here's
> what I found out:
>
> The EObjectContainmentEList returns only a local field for the featureID.
> The value of that field is 4, but when I use a watch-expression to get the
> EStructuralFeature, I also get an object of type
> org.eclipse.emf.ecore.impl.EReferenceImpl, which has 1 for the featureID
> value!
>
> The PersistableEList doesn't return a local field but it makes the call
> eStructuralFeature.getFeatureID() which then returns 1 (I think if the
> EObjectContainmentEList would make that call, too, it would return 1!
>
> Markus
>
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: [Teneo] Cannot add an item to a HibernatePersistableEList [message #77306 is a reply to message #77258] Thu, 29 March 2007 12:51 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5339
Registered: July 2009
Senior Member
Hi Ed,
Yes this case has multiple inheritance. The code you list below, in which class is this located?

The hibernate persistable elist extends the delegatingecoreelist which also has a method
getFeatureID. In my version it is like this:

@Override
public int getFeatureID()
{
return getEStructuralFeature().getFeatureID();
}

Should this getFeatureID also make use of the eclass of the owner of the elist? My emf version is
from 20070212.

gr. Martin

Ed Merks wrote:
> Markus,
>
> I haven't followed this whole chain closely, but it's important to keep
> in mind that a feature's ID with respect to the actual EClass of the
> EObject instance with that feature is the index within that EClass' list
> of eAllStructuralFeatures so with multiple inheritance, that means the
> ID of the feature with respect to a particular EClass may not be the
> same as the ID with respect to the EClass that defines the feature.
> Here's how the ID is computed with respect to any particular EClass:
>
> public int getFeatureID(EStructuralFeature feature)
> {
> EStructuralFeature [] eAllStructuralFeaturesData =
> getEAllStructuralFeaturesData();
> int index = feature.getFeatureID();
> if (index != -1)
> {
> for (int last = eAllStructuralFeaturesData.length; index <
> last; ++index)
> {
> if (eAllStructuralFeaturesData[index] == feature)
> {
> return index;
> }
> }
> }
> return -1;
> }
>
> In the case of single inheritance, the first if within the for loop will
> find it. There was a recent bug fix related to this,
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=175386, so hopefully
> that's not a factor in this issue.
>
>
> Markus Bischof wrote:
>> Hm...it's a org.eclipse.emf.ecore.impl.EReferenceImpl-object. Now here's
>> what I found out:
>>
>> The EObjectContainmentEList returns only a local field for the featureID.
>> The value of that field is 4, but when I use a watch-expression to get the
>> EStructuralFeature, I also get an object of type
>> org.eclipse.emf.ecore.impl.EReferenceImpl, which has 1 for the featureID
>> value!
>>
>> The PersistableEList doesn't return a local field but it makes the call
>> eStructuralFeature.getFeatureID() which then returns 1 (I think if the
>> EObjectContainmentEList would make that call, too, it would return 1!
>>
>> Markus
>>
>>
>>
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: [Teneo] Cannot add an item to a HibernatePersistableEList [message #77322 is a reply to message #77274] Thu, 29 March 2007 13:18 Go to previous messageGo to next message
Markus Bischof is currently offline Markus BischofFriend
Messages: 72
Registered: July 2009
Member
Hi!

I'm not quite sure wht you mean.

I set a breakpoint in the EObjectEList.class file in the constructor:

public EObjectEList(Class dataClass, InternalEObject owner, int featureID)
{
super(dataClass, owner);
this.featureID = featureID;
}

Is that the right place?

I found out, that when I load a model from the database, the owner-object is
always an object of type ActivityImpl, and when I load a model from the file
system, there are 2 or 3 calls of that contructor with a PackageImpl as
owner. I don't know if that means something but I justwanted to mention it.

I almost forgot to say thank you for your engagement! I appreciate that! I
hope we can find a solution for my problem!

Regards, Markus!


"Martin Taal" <mtaal@elver.org> schrieb im Newsbeitrag
news:eugb8l$pkv$1@build.eclipse.org...
> Okay, can you check in the Impl class of the parent object which featureid
> is passed when the EObjectContainmentList is created?
> Can post that construction code? (the new EObjectContain.....)
>
> gr. Martin
Re: [Teneo] Cannot add an item to a HibernatePersistableEList [message #77338 is a reply to message #77306] Thu, 29 March 2007 13:43 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

This is a multi-part message in MIME format.
--------------030402090805090203000506
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Martin,

This is a bug that hides until you hit a multiple inheritance case!
Please open a bugzilla. It should look like this:

public int getFeatureID()
{
return owner.eClass().getFeatureID(getEStructuralFeature());
}

I think I can still fix this for M6 today...


Martin Taal wrote:
> Hi Ed,
> Yes this case has multiple inheritance. The code you list below, in
> which class is this located?
>
> The hibernate persistable elist extends the delegatingecoreelist which
> also has a method getFeatureID. In my version it is like this:
>
> @Override
> public int getFeatureID()
> {
> return getEStructuralFeature().getFeatureID();
> }
>
> Should this getFeatureID also make use of the eclass of the owner of
> the elist? My emf version is from 20070212.
>
> gr. Martin
>
> Ed Merks wrote:
>> Markus,
>>
>> I haven't followed this whole chain closely, but it's important to
>> keep in mind that a feature's ID with respect to the actual EClass of
>> the EObject instance with that feature is the index within that
>> EClass' list of eAllStructuralFeatures so with multiple inheritance,
>> that means the ID of the feature with respect to a particular EClass
>> may not be the same as the ID with respect to the EClass that defines
>> the feature. Here's how the ID is computed with respect to any
>> particular EClass:
>>
>> public int getFeatureID(EStructuralFeature feature)
>> {
>> EStructuralFeature [] eAllStructuralFeaturesData =
>> getEAllStructuralFeaturesData();
>> int index = feature.getFeatureID();
>> if (index != -1)
>> {
>> for (int last = eAllStructuralFeaturesData.length; index <
>> last; ++index)
>> {
>> if (eAllStructuralFeaturesData[index] == feature)
>> {
>> return index;
>> }
>> }
>> }
>> return -1;
>> }
>>
>> In the case of single inheritance, the first if within the for loop
>> will find it. There was a recent bug fix related to this,
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=175386, so hopefully
>> that's not a factor in this issue.
>>
>>
>> Markus Bischof wrote:
>>> Hm...it's a org.eclipse.emf.ecore.impl.EReferenceImpl-object. Now
>>> here's what I found out:
>>>
>>> The EObjectContainmentEList returns only a local field for the
>>> featureID. The value of that field is 4, but when I use a
>>> watch-expression to get the EStructuralFeature, I also get an object
>>> of type org.eclipse.emf.ecore.impl.EReferenceImpl, which has 1 for
>>> the featureID value!
>>>
>>> The PersistableEList doesn't return a local field but it makes the
>>> call eStructuralFeature.getFeatureID() which then returns 1 (I think
>>> if the EObjectContainmentEList would make that call, too, it would
>>> return 1!
>>>
>>> Markus
>>>
>>>
>>
>
>


--------------030402090805090203000506
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Martin,<br>
<br>
This is a bug that hides until you hit a multiple inheritance case!&nbsp;
Please open a bugzilla.&nbsp; It should look like this:<br>
<blockquote>&nbsp; public int getFeatureID()<br>
&nbsp; {<br>
&nbsp;&nbsp;&nbsp; return owner.eClass().getFeatureID(getEStructuralFeature());<br>
&nbsp; }<br>
</blockquote>
I think I can still fix this for M6 today...<br>
<br>
<br>
Martin Taal wrote:
<blockquote cite="mideugcos$2li$1@build.eclipse.org" type="cite">Hi Ed,
<br>
Yes this case has multiple inheritance. The code you list below, in
which class is this located?
<br>
<br>
The hibernate persistable elist extends the delegatingecoreelist which
also has a method getFeatureID. In my version it is like this:
<br>
<br>
&nbsp; @Override
<br>
&nbsp; public int getFeatureID()
<br>
&nbsp; {
<br>
&nbsp;&nbsp;&nbsp; return getEStructuralFeature().getFeatureID();
<br>
&nbsp; }
<br>
<br>
Should this getFeatureID also make use of the eclass of the owner of
the elist? My emf version is from 20070212.
<br>
<br>
gr. Martin
<br>
<br>
Ed Merks wrote:
<br>
<blockquote type="cite">Markus,
<br>
<br>
I haven't followed this whole chain closely, but it's important to keep
in mind that a feature's ID with respect to the actual EClass of the
EObject instance with that feature is the index within that EClass'
list of eAllStructuralFeatures so with multiple inheritance, that means
the ID of the feature with respect to a particular EClass may not be
the same as the ID with respect to the EClass that defines the
feature.&nbsp; Here's how the ID is computed with respect to any particular
EClass:
<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public int getFeatureID(EStructuralFeature feature)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; EStructuralFeature [] eAllStructuralFeaturesData&nbsp; =
<br>
&nbsp;&nbsp;&nbsp; getEAllStructuralFeaturesData();
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; int index = feature.getFeatureID();
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; if (index != -1)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; {
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; for (int last = eAllStructuralFeaturesData.length; index &lt;
<br>
&nbsp;&nbsp;&nbsp; last; ++index)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (eAllStructuralFeaturesData[index] == feature)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; return index;
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; }
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; return -1;
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }
<br>
<br>
In the case of single inheritance, the first if within the for loop
will find it.&nbsp; There was a recent bug fix related to this,
<a class="moz-txt-link-freetext" href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=175386">https://bugs.eclipse.org/bugs/show_bug.cgi?id=175386</a>, so hopefully
that's not a factor in this issue.
<br>
<br>
<br>
Markus Bischof wrote:
<br>
<blockquote type="cite">Hm...it's a
org.eclipse.emf.ecore.impl.EReferenceImpl-object. Now here's what I
found out:
<br>
<br>
The EObjectContainmentEList returns only a local field for the
featureID. The value of that field is 4, but when I use a
watch-expression to get the EStructuralFeature, I also get an object of
type org.eclipse.emf.ecore.impl.EReferenceImpl, which has 1 for the
featureID value!
<br>
<br>
The PersistableEList doesn't return a local field but it makes the call
eStructuralFeature.getFeatureID() which then returns 1 (I think if the
EObjectContainmentEList would make that call, too, it would return 1!
<br>
<br>
Markus <br>
<br>
&nbsp; </blockquote>
<br>
</blockquote>
<br>
<br>
</blockquote>
<br>
</body>
</html>

--------------030402090805090203000506--
Re: [Teneo] Cannot add an item to a HibernatePersistableEList [message #77353 is a reply to message #77322] Thu, 29 March 2007 13:45 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5339
Registered: July 2009
Senior Member
Hi Markus,
I mean in the generated Impl class (ActivityImpl) there is a get method to get the list to which you
are adding the childobject. This get method should have a new EObjectContainmentEList statement. One
of the arguments to the constructor is a featureid. What value does this feature id have and how
does the generated code look like (in the get method)?

I also hope to find the issue here!

gr. Martin

Markus Bischof wrote:
> Hi!
>
> I'm not quite sure wht you mean.
>
> I set a breakpoint in the EObjectEList.class file in the constructor:
>
> public EObjectEList(Class dataClass, InternalEObject owner, int featureID)
> {
> super(dataClass, owner);
> this.featureID = featureID;
> }
>
> Is that the right place?
>
> I found out, that when I load a model from the database, the owner-object is
> always an object of type ActivityImpl, and when I load a model from the file
> system, there are 2 or 3 calls of that contructor with a PackageImpl as
> owner. I don't know if that means something but I justwanted to mention it.
>
> I almost forgot to say thank you for your engagement! I appreciate that! I
> hope we can find a solution for my problem!
>
> Regards, Markus!
>
>
> "Martin Taal" <mtaal@elver.org> schrieb im Newsbeitrag
> news:eugb8l$pkv$1@build.eclipse.org...
>> Okay, can you check in the Impl class of the parent object which featureid
>> is passed when the EObjectContainmentList is created?
>> Can post that construction code? (the new EObjectContain.....)
>>
>> gr. Martin
>
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: [Teneo] Cannot add an item to a HibernatePersistableEList [message #77371 is a reply to message #77353] Thu, 29 March 2007 13:58 Go to previous messageGo to next message
Markus Bischof is currently offline Markus BischofFriend
Messages: 72
Registered: July 2009
Member
public EList getNodes() {
if (nodes == null) {
nodes = new EObjectContainmentEList(ActivityNode.class, this,
ProcessesPackage.ACTIVITY__NODES);
}
return nodes;
}

public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case ProcessesPackage.ACTIVITY__NODES:
return getNodes();
case ProcessesPackage.ACTIVITY__EDGES:
return getEdges();
case ProcessesPackage.ACTIVITY__REFERENCES:
return getReferences();
case ProcessesPackage.ACTIVITY__REFERENCE_EDGES:
return getReferenceEdges();
case ProcessesPackage.ACTIVITY__EVENT_HANDLER:
return getEventHandler();
case ProcessesPackage.ACTIVITY__TOTALEXECUTIONTIME:
return new Integer(getTotalexecutiontime());
}
return super.eGet(featureID, resolve, coreType);
}

Ok...hopefully this is right! When I'm in debug mode and I just added over
the palette a new item to the activity (I draw them with the mouse), then I
come in the eGet-method. The switch-statement does nothing and the method
continues calling the super.eGet-method. Maybe the intention is, that
normally it should return getNodes(), but it never reaches that method,
because the featureID is wrong...

Did you see the post from Ed Merks? He said that this could be a
bug...perhaps that's already the solution for the problem!?!?

Markus


"Martin Taal" <mtaal@elver.org> schrieb im Newsbeitrag
news:eugfuk$rfc$1@build.eclipse.org...
> Hi Markus,
> I mean in the generated Impl class (ActivityImpl) there is a get method to
> get the list to which you are adding the childobject. This get method
> should have a new EObjectContainmentEList statement. One of the arguments
> to the constructor is a featureid. What value does this feature id have
> and how does the generated code look like (in the get method)?
>
> I also hope to find the issue here!
>
> gr. Martin
>
> Markus Bischof wrote:
>> Hi!
>>
>> I'm not quite sure wht you mean.
>>
>> I set a breakpoint in the EObjectEList.class file in the constructor:
>>
>> public EObjectEList(Class dataClass, InternalEObject owner, int
>> featureID)
>> {
>> super(dataClass, owner);
>> this.featureID = featureID;
>> }
>>
>> Is that the right place?
>>
>> I found out, that when I load a model from the database, the owner-object
>> is always an object of type ActivityImpl, and when I load a model from
>> the file system, there are 2 or 3 calls of that contructor with a
>> PackageImpl as owner. I don't know if that means something but I
>> justwanted to mention it.
>>
>> I almost forgot to say thank you for your engagement! I appreciate that!
>> I hope we can find a solution for my problem!
>>
>> Regards, Markus!
>>
>>
>> "Martin Taal" <mtaal@elver.org> schrieb im Newsbeitrag
>> news:eugb8l$pkv$1@build.eclipse.org...
>>> Okay, can you check in the Impl class of the parent object which
>>> featureid is passed when the EObjectContainmentList is created?
>>> Can post that construction code? (the new EObjectContain.....)
>>>
>>> gr. Martin
>>
>>
>
>
> --
>
> With Regards, Martin Taal
>
> Springsite/Elver.org
> Office: Hardwareweg 4, 3821 BV Amersfoort
> Postal: Nassaulaan 7, 3941 EC Doorn
> The Netherlands
> Tel: +31 (0)84 420 2397
> Fax: +31 (0)84 225 9307
> Mail: mtaal@springsite.com - mtaal@elver.org
> Web: www.springsite.com - www.elver.org
Re: [Teneo] Cannot add an item to a HibernatePersistableEList [message #77386 is a reply to message #77371] Thu, 29 March 2007 14:02 Go to previous messageGo to next message
Markus Bischof is currently offline Markus BischofFriend
Messages: 72
Registered: July 2009
Member
The value for the featureID is 1...
Re: [Teneo] Cannot add an item to a HibernatePersistableEList [message #77401 is a reply to message #77338] Thu, 29 March 2007 14:05 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5339
Registered: July 2009
Senior Member
Ed,
Yes indeed, I was overriding the getFeatureID method also which I should not do, or do it as you
listed below.
Here is the bugzilla:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=179994

gr. Martin

Ed Merks wrote:
> Martin,
>
> This is a bug that hides until you hit a multiple inheritance case!
> Please open a bugzilla. It should look like this:
>
> public int getFeatureID()
> {
> return owner.eClass().getFeatureID(getEStructuralFeature());
> }
>
> I think I can still fix this for M6 today...
>
>
> Martin Taal wrote:
>> Hi Ed,
>> Yes this case has multiple inheritance. The code you list below, in
>> which class is this located?
>>
>> The hibernate persistable elist extends the delegatingecoreelist which
>> also has a method getFeatureID. In my version it is like this:
>>
>> @Override
>> public int getFeatureID()
>> {
>> return getEStructuralFeature().getFeatureID();
>> }
>>
>> Should this getFeatureID also make use of the eclass of the owner of
>> the elist? My emf version is from 20070212.
>>
>> gr. Martin
>>
>> Ed Merks wrote:
>>> Markus,
>>>
>>> I haven't followed this whole chain closely, but it's important to
>>> keep in mind that a feature's ID with respect to the actual EClass of
>>> the EObject instance with that feature is the index within that
>>> EClass' list of eAllStructuralFeatures so with multiple inheritance,
>>> that means the ID of the feature with respect to a particular EClass
>>> may not be the same as the ID with respect to the EClass that defines
>>> the feature. Here's how the ID is computed with respect to any
>>> particular EClass:
>>>
>>> public int getFeatureID(EStructuralFeature feature)
>>> {
>>> EStructuralFeature [] eAllStructuralFeaturesData =
>>> getEAllStructuralFeaturesData();
>>> int index = feature.getFeatureID();
>>> if (index != -1)
>>> {
>>> for (int last = eAllStructuralFeaturesData.length; index <
>>> last; ++index)
>>> {
>>> if (eAllStructuralFeaturesData[index] == feature)
>>> {
>>> return index;
>>> }
>>> }
>>> }
>>> return -1;
>>> }
>>>
>>> In the case of single inheritance, the first if within the for loop
>>> will find it. There was a recent bug fix related to this,
>>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=175386, so hopefully
>>> that's not a factor in this issue.
>>>
>>>
>>> Markus Bischof wrote:
>>>> Hm...it's a org.eclipse.emf.ecore.impl.EReferenceImpl-object. Now
>>>> here's what I found out:
>>>>
>>>> The EObjectContainmentEList returns only a local field for the
>>>> featureID. The value of that field is 4, but when I use a
>>>> watch-expression to get the EStructuralFeature, I also get an object
>>>> of type org.eclipse.emf.ecore.impl.EReferenceImpl, which has 1 for
>>>> the featureID value!
>>>>
>>>> The PersistableEList doesn't return a local field but it makes the
>>>> call eStructuralFeature.getFeatureID() which then returns 1 (I think
>>>> if the EObjectContainmentEList would make that call, too, it would
>>>> return 1!
>>>>
>>>> Markus
>>>>
>>>>
>>>
>>
>>
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: [Teneo] Cannot add an item to a HibernatePersistableEList [message #77432 is a reply to message #77386] Thu, 29 March 2007 14:56 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5339
Registered: July 2009
Senior Member
Okay, my feel is that this is the multi-inheritance feature bug Ed referred to. I will solve this in
Teneo also so that it works for older releases.
I will do a new build probably tomorrow which contains the fix for this.

gr. Martin

Markus Bischof wrote:
> The value for the featureID is 1...
>
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: [Teneo] Cannot add an item to a HibernatePersistableEList [message #77502 is a reply to message #77432] Thu, 29 March 2007 15:35 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Martin,

I also fixed two other analogous problems in EcoreEList and
FeatureMapUtil and did that for both 2.2.3 and 2.3.0; the fix will be in
today's M6 build (and in next weeks 2.2.3 maintenance build).


Martin Taal wrote:
> Okay, my feel is that this is the multi-inheritance feature bug Ed
> referred to. I will solve this in Teneo also so that it works for
> older releases.
> I will do a new build probably tomorrow which contains the fix for this.
>
> gr. Martin
>
> Markus Bischof wrote:
>> The value for the featureID is 1...
>>
>
>
Re: [Teneo] Cannot add an item to a HibernatePersistableEList [message #77525 is a reply to message #77502] Thu, 29 March 2007 17:28 Go to previous messageGo to next message
Markus Bischof is currently offline Markus BischofFriend
Messages: 72
Registered: July 2009
Member
Hi!

I just downloaded the new emf 2.2.3M6 build (from today) and uncompressed it
in my eclipse-folder. I don't know if I did it right, but there is still the
same problem! I actually don't see a difference in the code...

The getFeatureID()-method of the class EOjbectEList.class still returns only
a local field called featureID, but when I look in debug mode in the same
class in the getEStructuralFeature()-object, the featureID of that object is
1 (which is a EReferenceImpl).

When I'm using a model from the database, the getFeatureID()-method is
called from a DelegatingEcoreEList-object (which possibly is the
HibernatePersistableEList). to a PersistableEList-object.
On the other hand, when I'm loading a model from the filesystem using a
XMIResource, the getFeatureID()-method is called from an EcoreEList-object
(which possibly is a EObjectContaintmentEList) to an EObjectEList-object.

For the same empty model and adding a simple node, using the
HibernateResource I get 1 as featureID (leading to -2 ), and using the
XMIResource I get 4 as featureID (leading to -5). -5 works fine.

The editor did not even recognize that it is dirty (meaning that a new
object is added), but when I'm using the debugger to set manually the
featureID to 4 just after is has been computed, it realizes that an element
was added (there is a * in Name of the resource...), but the element isn't
displayed...



Here is the code which causes the problems. It is the same in both,
DelegatingECoreEList.class and ECoreEList.class, but as mentioned above, the
getFeatureID()-method differs in the implementations (PersistableEList and
EObjectEList).


....
else
{
return
internalEObject.eInverseAdd
(owner,
InternalEObject.EOPPOSITE_FEATURE_BASE - getFeatureID(),
null,
notifications);
}
Re: [Teneo] Cannot add an item to a HibernatePersistableEList [message #77541 is a reply to message #77525] Thu, 29 March 2007 17:34 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5339
Registered: July 2009
Senior Member
Hi Markus,
Yes that's the part that I need to fix, the PersistableEList overrides the getFeatureId method. It
should not for the new release. If everything goes well then tomorrow there should be a new release
of Teneo which solves this.

gr. Martin

Markus Bischof wrote:
> Hi!
>
> I just downloaded the new emf 2.2.3M6 build (from today) and uncompressed it
> in my eclipse-folder. I don't know if I did it right, but there is still the
> same problem! I actually don't see a difference in the code...
>
> The getFeatureID()-method of the class EOjbectEList.class still returns only
> a local field called featureID, but when I look in debug mode in the same
> class in the getEStructuralFeature()-object, the featureID of that object is
> 1 (which is a EReferenceImpl).
>
> When I'm using a model from the database, the getFeatureID()-method is
> called from a DelegatingEcoreEList-object (which possibly is the
> HibernatePersistableEList). to a PersistableEList-object.
> On the other hand, when I'm loading a model from the filesystem using a
> XMIResource, the getFeatureID()-method is called from an EcoreEList-object
> (which possibly is a EObjectContaintmentEList) to an EObjectEList-object.
>
> For the same empty model and adding a simple node, using the
> HibernateResource I get 1 as featureID (leading to -2 ), and using the
> XMIResource I get 4 as featureID (leading to -5). -5 works fine.
>
> The editor did not even recognize that it is dirty (meaning that a new
> object is added), but when I'm using the debugger to set manually the
> featureID to 4 just after is has been computed, it realizes that an element
> was added (there is a * in Name of the resource...), but the element isn't
> displayed...
>
>
>
> Here is the code which causes the problems. It is the same in both,
> DelegatingECoreEList.class and ECoreEList.class, but as mentioned above, the
> getFeatureID()-method differs in the implementations (PersistableEList and
> EObjectEList).
>
>
> ....
> else
> {
> return
> internalEObject.eInverseAdd
> (owner,
> InternalEObject.EOPPOSITE_FEATURE_BASE - getFeatureID(),
> null,
> notifications);
> }
>
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: [Teneo] Cannot add an item to a HibernatePersistableEList [message #77554 is a reply to message #77541] Thu, 29 March 2007 17:45 Go to previous messageGo to next message
Markus Bischof is currently offline Markus BischofFriend
Messages: 72
Registered: July 2009
Member
Ah, ok...I thought the new emf version would already fix "something"! :)

My fault!

Then I'm looking forward for the new release and I'm surely post here if it
works! (And probably if it doesn't, too! ;) )

Kind regards,
Markus
Re: [Teneo] Cannot add an item to a HibernatePersistableEList [message #77569 is a reply to message #77554] Thu, 29 March 2007 18:19 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: cdamus.ca.ibm.com

Hi, Markus,

What you downloaded today was a Maintenance Build from the 2.2.3 release,
not M6 of the 2.3 release. It's maintenance continued on the 2.2 release
from last year ...

Cheers,

Christian


Markus Bischof wrote:

> Ah, ok...I thought the new emf version would already fix "something"! :)
>
> My fault!
>
> Then I'm looking forward for the new release and I'm surely post here if
> it works! (And probably if it doesn't, too! ;) )
>
> Kind regards,
> Markus
Re: [Teneo] Cannot add an item to a HibernatePersistableEList [message #77585 is a reply to message #77569] Thu, 29 March 2007 18:25 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

This is a multi-part message in MIME format.
--------------040906060601020701010305
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Christian,

Yeah. I was confused. We didn't publish our M6 yet today and this
week's 2.2.3 maintenance build was published before I fixed the problem
there too...


Christian W. Damus wrote:
> Hi, Markus,
>
> What you downloaded today was a Maintenance Build from the 2.2.3 release,
> not M6 of the 2.3 release. It's maintenance continued on the 2.2 release
> from last year ...
>
> Cheers,
>
> Christian
>
>
> Markus Bischof wrote:
>
>
>> Ah, ok...I thought the new emf version would already fix "something"! :)
>>
>> My fault!
>>
>> Then I'm looking forward for the new release and I'm surely post here if
>> it works! (And probably if it doesn't, too! ;) )
>>
>> Kind regards,
>> Markus
>>
>
>


--------------040906060601020701010305
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Christian,<br>
<br>
Yeah.&nbsp; I was confused.&nbsp; We didn't publish our M6 yet today and this
week's 2.2.3 maintenance build was published before I fixed the problem
there too...<br>
<br>
<br>
Christian W. Damus wrote:
<blockquote cite="mideugvvf$1dn$2@build.eclipse.org" type="cite">
<pre wrap="">Hi, Markus,

What you downloaded today was a Maintenance Build from the 2.2.3 release,
not M6 of the 2.3 release. It's maintenance continued on the 2.2 release
from last year ...

Cheers,

Christian


Markus Bischof wrote:

</pre>
<blockquote type="cite">
<pre wrap="">Ah, ok...I thought the new emf version would already fix "something"! :)

My fault!

Then I'm looking forward for the new release and I'm surely post here if
it works! (And probably if it doesn't, too! ;) )

Kind regards,
Markus
</pre>
</blockquote>
<pre wrap=""><!---->
</pre>
</blockquote>
<br>
</body>
</html>

--------------040906060601020701010305--
Re: [Teneo] Cannot add an item to a HibernatePersistableEList [message #77822 is a reply to message #77585] Sat, 31 March 2007 09:59 Go to previous message
Markus Bischof is currently offline Markus BischofFriend
Messages: 72
Registered: July 2009
Member
This is a multi-part message in MIME format.

------=_NextPart_000_000C_01C7738B.FBCC3120
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi Martin!

I've just added an item to my model! The issue is solved with the new =
version!

Thanks a lot for your help, very much appreciated.

Kind regards,
Markus


------=_NextPart_000_000C_01C7738B.FBCC3120
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE></TITLE>
<META http-equiv=3DContent-Type =
content=3Dtext/html;charset=3DISO-8859-1>
<META content=3D"MSHTML 6.00.6000.16414" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY text=3D#000000 bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi Martin!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I've just added an item to my model! =
The issue is=20
solved with the new version!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Thanks a lot for your help, very=20
much&nbsp;appreciated.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Kind regards,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Markus</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV></BODY></HTML>

------=_NextPart_000_000C_01C7738B.FBCC3120--
Re: [Teneo] Cannot add an item to a HibernatePersistableEList [message #603928 is a reply to message #77007] Thu, 29 March 2007 08:59 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5339
Registered: July 2009
Senior Member
Hi Markus,
Is the object on which eContainmentFeature is called a new object or an object loaded from the db?

gr. Martin

Markus Bischof wrote:
> Hi!
>
> I've managed to load and save HibernateResource-Objects, but now I want
> to add some items to that resource using an AddCommand
> (org.eclipse.emf.edit.command.AddCommand), which calls (in my case) the
> method "addAll(collection)" of the HibernatePersistableEList-object
> (ownerList) (line 400). The "collection" contains only one object. This
> method runs until the call "notifications = inverseAdd(value,
> notifications)" (line 439) which throws an exception.
>
> After some debugging I found the error in the BasicEObjectImpl.class of
> the one object contained in the "collection". It calls
> "newResource.attached(this)" in line 912 (newResource is a
> HibernateResource) which then calls the
> "eObject.eContainmentFeature()"-method. This method runs until line 459,
> 460 an then tries to execute the following code:
>
> FeatureMap featureMap = (FeatureMap)eContainer.eGet(eFeature);
> for (int i = 0, size = featureMap.size(); i < size; ++i) {...}
>
> But in my case, the method eContainer.eGet(eFeature) returns null or a
> string-object, but in no case a FeatureMap. (More information: eFeature
> is an EAttributeImpl-class and has as name "name", which means that the
> name of the eContainer should be resolved, at least I think so!)
>
> Do I have to change my implementation so that it returns some FeatureMap
> (I actually don't know what that map should contain!) or is there
> something wrong with the HibernatePersistableEList-object?
>
> I hope this is not too technical!
>
> Markus Bischof


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: [Teneo] Cannot add an item to a HibernatePersistableEList [message #603931 is a reply to message #77019] Thu, 29 March 2007 09:36 Go to previous message
Markus Bischof is currently offline Markus BischofFriend
Messages: 72
Registered: July 2009
Member
Hi!

It's a new object and it doesn't come from the database. (In my case it's an
ActionImpl.).

Markus
Re: [Teneo] Cannot add an item to a HibernatePersistableEList [message #603933 is a reply to message #77027] Thu, 29 March 2007 09:48 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5339
Registered: July 2009
Senior Member
Hi Markus,
What happens if you call eContainmentFeature() on the object yourselve (so without adding it to
anything)?
If it fails then I assume that the featureid's of your the efeatures of different types in your
generated classes are not in sync. You can try to regenerate all the code (for all the packages).

gr. Martin

Markus Bischof wrote:
> Hi!
>
> It's a new object and it doesn't come from the database. (In my case it's an
> ActionImpl.).
>
> Markus
>
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: [Teneo] Cannot add an item to a HibernatePersistableEList [message #603935 is a reply to message #77032] Thu, 29 March 2007 09:59 Go to previous message
Markus Bischof is currently offline Markus BischofFriend
Messages: 72
Registered: July 2009
Member
I just executed

Action impl = ProcessesFactory.eINSTANCE.createAction();
Object o = impl.eContainingFeature();

and I get no exception. o is null.
Re: [Teneo] Cannot add an item to a HibernatePersistableEList [message #603937 is a reply to message #77036] Thu, 29 March 2007 10:06 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5339
Registered: July 2009
Senior Member
You have to do: eContainmentFeature()
and probably on the object which you are using in the addAll call you mentioned earlier. It needs to
be filled with some data.

Is the parent to which you are adding the object new or is it loaded from the db?

gr. Martin

Markus Bischof wrote:
> I just executed
>
> Action impl = ProcessesFactory.eINSTANCE.createAction();
> Object o = impl.eContainingFeature();
>
> and I get no exception. o is null.
>
>
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: [Teneo] Cannot add an item to a HibernatePersistableEList [message #603939 is a reply to message #77039] Thu, 29 March 2007 10:23 Go to previous message
Markus Bischof is currently offline Markus BischofFriend
Messages: 72
Registered: July 2009
Member
This is a multi-part message in MIME format.

------=_NextPart_000_003B_01C771FD.13F86920
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Oh...sorry...

Well, it is a bit difficult to get to that point before the =
hibernateResource.attached(this) call, but I managed to get there.

I just added this.eContainmentFeature(); before the attached-call and =
there is also an exception (it's the same with the FeatureMap).

The parent (I think that has to be the container) is from the database =
(ActivityImpl).

Markus
------=_NextPart_000_003B_01C771FD.13F86920
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.6000.16414" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>Oh...sorry...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Well, it is a bit difficult to get to =
that point=20
before the hibernateResource.attached(this) call, but I managed to get=20
there.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I just added t</FONT><FONT face=3DArial =

size=3D2>his.eContainmentFeature(); before the attached-call and there =
is also an=20
exception (it's the same with the FeatureMap).</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT><FONT face=3DArial =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>The parent (I think that has to be the =
container)=20
is from the database (ActivityImpl).</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Markus</FONT></DIV></BODY></HTML>

------=_NextPart_000_003B_01C771FD.13F86920--
Re: [Teneo] Cannot add an item to a HibernatePersistableEList [message #603942 is a reply to message #77041] Thu, 29 March 2007 10:30 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5339
Registered: July 2009
Senior Member
Can you create a parent, fill it with some data, and then add a child to it in the same way as you
do now? Only without loading the parent from the database (so a new parent) and then call this
method afterwards? To see if it fails.

gr. Martin

Markus Bischof wrote:
> Oh...sorry...
>
> Well, it is a bit difficult to get to that point before the
> hibernateResource.attached(this) call, but I managed to get there.
>
> I just added this.eContainmentFeature(); before the attached-call and
> there is also an exception (it's the same with the FeatureMap).
>
> The parent (I think that has to be the container) is from the database
> (ActivityImpl).
>
> Markus


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Previous Topic:New build for Teneo, release notes (0.8.0 - 0.7.5)
Next Topic:[Teneo] Mechanism for updating the ecore-model and the database automatically?!
Goto Forum:
  


Current Time: Fri Nov 21 02:43:25 GMT 2014

Powered by FUDForum. Page generated in 0.05028 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software