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

Bug 356181

Summary: [Hibernate] Exception with queryXRefs and teneo Annotation @Transient
Product: [Modeling] EMF Reporter: Christophe Bouhier <dzonekl>
Component: cdo.coreAssignee: Martin Taal <mtaal>
Status: CLOSED FIXED QA Contact: Eike Stepper <stepper>
Severity: normal    
Priority: P3 CC: stepper
Version: 4.2   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description Christophe Bouhier CLA 2011-08-30 07:41:44 EDT
We've replaced the EMF.Edit.DeleteCommand to use the CDO query mechanism to find references like: (Instead of the Ecore Util x-ref which doesn't find references outside the resource set).


List<CDOObjectReference> queryXRefs = cdoView.queryXRefs(
                            (CDOObject) o, new EReference[] {});
                    return queryXRefs;


Unfortunately this will lead to the Exception below, for Eclass which have been annotated with a Teneo annotation in the .ecore

 <eAnnotations source="teneo.jpa">
      <details key="appinfo" value="@Transient"/>
    </eAnnotations>


I wonder, what would be a solution for this. Can CDO/Hibernate somehow be patched, to ignore these EClasses? I would like to keep this class transient and not persist it. Thank You, Christophe

Caused by: java.lang.IllegalArgumentException: EClass ExpressionResult does not have an entity name, has it been mapped to Hibernate?
    at org.eclipse.emf.cdo.server.internal.hibernate.HibernateStore.getEntityName(HibernateStore.java:188)
    at org.eclipse.emf.cdo.server.internal.hibernate.HibernateStoreAccessor.queryXRefs(HibernateStoreAccessor.java:541)
    at org.eclipse.emf.cdo.internal.server.XRefsQueryHandler.executeQuery(XRefsQueryHandler.java:66)
    at org.eclipse.emf.cdo.internal.server.QueryManager$QueryContext.run(QueryManager.java:293)
    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)
Comment 1 Eike Stepper CLA 2012-08-14 22:55:49 EDT
Moving all open issues to 4.2. Open bugs can be ported to 4.1 maintenance after they've been fixed in master.
Comment 2 Martin Taal CLA 2012-11-25 15:16:09 EST
Is solved and pushed to git in the 4.2 stream. Will be available in the next build.