we have/had one EClass which has an EReference with an EType 'EObject'. If an item is set here it is not found with CDOView.queryXRefs. I changed my model and defined an Interface and used this as the EType and it works.
Am 20.09.2013 11:51, schrieb Per Sterner:
> Hello!
>
> we have/had one EClass which has an EReference with an EType 'EObject'. If an item is set here it is not found with
> CDOView.queryXRefs. I changed my model and defined an Interface and used this as the EType and it works.
>
> The example fails, if the EType is 'EObject'
I'm not exactly sure what you mean but we've recently fixed some bugs in the handling of inheritance and EObject:
>
>
> public void testMyXref() throws Exception
> {
> PurchaseOrder purchaseOrder1 = getModel1Factory().createPurchaseOrder();
>
> Supplier supplier = getModel1Factory().createSupplier();
> supplier.setObject(purchaseOrder1);
>
> CDOSession session1 = openSession();
> CDOTransaction transaction1 = session1.openTransaction();
>
> CDOResource resource = transaction1.createResource(getResourcePath("/test1"));
> resource.getContents().add(supplier);
> resource.getContents().add(purchaseOrder1);
>
> transaction1.commit();
>
> /******************/
>
> List<CDOObjectReference> rc = transaction1.queryXRefs(CDOUtil.getCDOObject(purchaseOrder1), new EReference[] {});
> System.out.println(rc);
> assertEquals(1, rc.size());
>
> }
>
>
> The 'Referential Integrity Check' is affected too on deleting the referenced item. The result is a stale object
> without a commit exception.
>
> Perhaps a EType with EObject should not be allowed for performance reasons? At least there should be an
> exception/warning when using such an EClass :)
>
> Regards,
>
> Per Sterner
>
Am 20.09.2013 17:43, schrieb Per Sterner:
> I updated to the current cdo-master branch in my testworkspace. And made another test-function which uses the Model6 :)
>
> The test fails.
Ok, thanks for trying it out with master. Please submit a bugzilla and attach your test case there. I'll try to look at
it ASAP ;-)