Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 324067

Summary: Query2 returning wrong results
Product: [Modeling] EMF Reporter: Ashwani Kr Sharma <ashw.kumar>
Component: Query2Assignee: Project Inbox <emf.query2-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Patch fixes this issue wayne.beaton: iplog+

Description Ashwani Kr Sharma CLA 2010-08-31 05:05:32 EDT
Build Identifier: 

Following query in the demo editor returns wrong results:
from Person as p in resources { "platform:/resource/org.eclipse.emf.query2.librarytest/data/person/T.xmi" }
 ,Book as b in resources {"platform:/resource/org.eclipse.emf.query2.librarytest/data/library/Accra.xmi" }
select p, p.name where b.borrowedBy = p

Problem: If Accra.xml is dirty, it returns all the p's even from resources outside T.xmi

Code to make Accra.xmi dirty:
URI uri1 =  URI.createURI("platform:/resource/org.eclipse.emf.query2.librarytest/data/library/Accra.xmi");

Resource resource1 = rs.getResource(uri1, true);
EObject eObject = resource1.getContents().get(0);
resource1.setTrackingModification(true);
resource1.setModified(true);

Reproducible: Always

Steps to Reproduce:
Following query in the demo editor returns wrong results:
from Person as p in resources { "platform:/resource/org.eclipse.emf.query2.librarytest/data/person/T.xmi" }
 ,Book as b in resources {"platform:/resource/org.eclipse.emf.query2.librarytest/data/library/Accra.xmi" }
select p, p.name where b.borrowedBy = p

Problem: If Accra.xml is dirty, it returns all the p's even from resources outside T.xmi

Code to make Accra.xmi dirty:
URI uri1 =  URI.createURI("platform:/resource/org.eclipse.emf.query2.librarytest/data/library/Accra.xmi");

Resource resource1 = rs.getResource(uri1, true);
EObject eObject = resource1.getContents().get(0);
resource1.setTrackingModification(true);
resource1.setModified(true);
Comment 1 Ashwani Kr Sharma CLA 2010-09-01 05:50:02 EDT
Created attachment 177925 [details]
Patch fixes this issue

Patch fixes this issue.

Now, during schdeuling the spreading happens only within target scope of the node
Comment 2 Bernd Kolb CLA 2010-09-07 06:10:44 EDT
Looks good, patch applied!

Thx
Bernd