Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 324067 - Query2 returning wrong results
Summary: Query2 returning wrong results
Status: RESOLVED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: Query2 (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-31 05:05 EDT by Ashwani Kr Sharma CLA
Modified: 2011-05-17 18:01 EDT (History)
0 users

See Also:


Attachments
Patch fixes this issue (3.33 KB, text/plain)
2010-09-01 05:50 EDT, Ashwani Kr Sharma CLA
wayne.beaton: iplog+
Details

Note You need to log in before you can comment on or make changes to this bug.
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