Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 333648 - querying the XRef and ensureReferentialIntegrity=true with abstract EMF classes
Summary: querying the XRef and ensureReferentialIntegrity=true with abstract EMF classes
Status: CLOSED WORKSFORME
Alias: None
Product: EMF
Classification: Modeling
Component: cdo.core (show other bugs)
Version: 4.0   Edit
Hardware: All All
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Eike Stepper CLA
QA Contact: Eike Stepper CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-06 08:30 EST by Wim Bast CLA
Modified: 2011-01-25 08:21 EST (History)
0 users

See Also:


Attachments
Changes in the test models/tests - for future reference (443.55 KB, patch)
2011-01-07 12:20 EST, Eike Stepper CLA
no flags Details | Diff
Patch v2 (439.46 KB, patch)
2011-01-07 13:01 EST, Eike Stepper CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Wim Bast CLA 2011-01-06 08:30:23 EST
Build Identifier: 

a query on the XRef without specific classes results in queries on tables of abstract classes. Tables of abstract classes do not exist, hence resulting in SQL exceptions. 

Reproducible: Always
Comment 1 Wim Bast CLA 2011-01-06 08:35:06 EST
org.eclipse.net4j.signal.RemoteException: org.eclipse.net4j.signal.RemoteException: org.eclipse.net4j.db.DBException: org.h2.jdbc.JdbcSQLException: Table PARTS_PART not found; SQL statement:
SELECT cdo_id, owningConcept FROM Parts_Part WHERE cdo_version>0 AND cdo_revised=0 AND owningConcept IN (20225) [42102-117]
   at org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.AbstractHorizontalClassMapping.queryScalarXRefs(AbstractHorizontalClassMapping.java:861)
   at org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.AbstractHorizontalClassMapping.queryXRefs(AbstractHorizontalClassMapping.java:785)
   at org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.AbstractHorizontalMappingStrategy.queryXRefs(AbstractHorizontalMappingStrategy.java:139)
   at org.eclipse.emf.cdo.server.internal.db.DBStoreAccessor.queryXRefs(DBStoreAccessor.java:289)
   at org.eclipse.emf.cdo.internal.server.XRefsQueryHandler.executeQuery(XRefsQueryHandler.java:63)
   at org.eclipse.emf.cdo.internal.server.QueryManager$QueryContext.run(QueryManager.java:284)
   at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
   at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
   at java.util.concurrent.FutureTask.run(FutureTask.java:138)
   at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
   at java.lang.Thread.run(Thread.java:619)
Caused by: org.h2.jdbc.JdbcSQLException: Table PARTS_PART not found; SQL statement:
SELECT cdo_id, owningConcept FROM Parts_Part WHERE cdo_version>0 AND cdo_revised=0 AND owningConcept IN (20225) [42102-117]
   at org.h2.message.Message.getSQLException(Message.java:105)
   at org.h2.message.Message.getSQLException(Message.java:116)
   at org.h2.message.Message.getSQLException(Message.java:75)
   at org.h2.command.Parser.readTableOrView(Parser.java:4265)
   at org.h2.command.Parser.readTableFilter(Parser.java:980)
......................
Comment 2 Eike Stepper CLA 2011-01-07 12:18:43 EST
I've spent hours trying to reproduce your problem, but failed. Can you give me the exact code that you use to call CDOView.queryXRefs()?

The only thing I could do is make an exception pop up a little earlier. Can you try that?
Comment 3 Eike Stepper CLA 2011-01-07 12:20:27 EST
Created attachment 186292 [details]
Changes in the test models/tests - for future reference
Comment 4 Eike Stepper CLA 2011-01-07 13:01:36 EST
Created attachment 186294 [details]
Patch v2
Comment 5 Eike Stepper CLA 2011-01-07 13:02:36 EST
Internal note: model1.Order is now abstract.
Comment 6 Eike Stepper CLA 2011-01-07 13:06:24 EST
Committed patch v2 to HEAD
Comment 7 Eike Stepper CLA 2011-01-25 06:54:30 EST
Wim, is this problem still present?
Comment 8 Wim Bast CLA 2011-01-25 06:59:43 EST
No, the problem seams to be fixed or was wrongly assigned to the 4.0 version. Probably the latter.
Comment 9 Eike Stepper CLA 2011-01-25 08:21:36 EST
Great! Please reopen if necessary ;-)