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

Bug 330163

Summary: [Hibernate] TeneoHibernateMappingProvider#getMapping() does not remove EcorePackage/EResourcePackage
Product: [Modeling] EMF Reporter: Eike Stepper <stepper>
Component: cdo.coreAssignee: Martin Taal <mtaal>
Status: CLOSED INVALID QA Contact: Eike Stepper <stepper>
Severity: normal    
Priority: P3    
Version: 4.0   
Target Milestone: ---   
Hardware: Macintosh   
OS: Mac OS X   
Whiteboard:

Description Eike Stepper CLA 2010-11-13 01:47:49 EST
Cloned from: 330075: TeneoHibernateMappingProvider#getMapping() does not remove EcorePackage/EResourcePackage
https://bugs.eclipse.org/bugs/show_bug.cgi?id=330075

In method TeneoHibernateMappingProvider#getMapping() the packages EcorePackage and EResourcePackage are intended to be be removed:

----------------------------------------------------------------------------------
    // translate the list of EPackages to an array
    final List<EPackage> epacks = getHibernateStore().getPackageHandler().getEPackages();
    // remove the ecore and resource package
    epacks.remove(EcorePackage.eINSTANCE);
    epacks.remove(EresourcePackage.eINSTANCE);
----------------------------------------------------------------------------------
 
This does not work (or at least in the scenario I had) this way, since the HibernateStore's package handler retrieves another instance then the singleton instance the plugins provide.

Instead of trying to remove the packages by instance from the packs list they have to be removed by their nsURI. The instances in epacks that match EcorePackage.eNS_URI and EResourcePackage.eNS_URI must be searched and removed.
Comment 1 Martin Taal CLA 2011-05-15 07:56:18 EDT
This code does not exist anymore, closing the issue.