[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.tools.emf] Question re href and @children

Hello,

I am having a strange issue with hrefs.
I have 2 resources.
In the first I have a number of Object As which contains a collection of 
Object Bs (containment = true)
(I also have something things above A but we'll focus on A and B for 
example)
In the second I have a reference to a collection of Object Bs (containment = 
false)

The href for one of the Object Bs in the second resource reads like this:
href="resource1.config#//@children.2/@children.3/@myobjectBs.0

The issue arises when I delete an Object A.
In the first resource it is now found at @children.2/@children.2
instead of at @children.2/@children.3
This only occurs if I delete an Object A that was not the last created one.
In other words it seems as if that format is like an index.
So when I delete one Object A any ObjectAs created after it have their 
"indexes" updated.

However the second resource does not update to reflect this.

So when I try to restart the application the collection of ObjectBs from 
resource 2 does not find an object.

I confirmed that this was what was happening by changing the reference 
manually in the xml file of the second resource
So If I change index to reflect resource 1 it works fine.

I tried making sure that resource1 was saved first and then resource2 but it 
made no difference.

Has anyone any ideas as to why this is happening an how I might fix it ?

thanks,
Alan.