Community
Participate
Working Groups
Build Identifier: 3.0 The raw replication does not replicate all db tables. Which db tables depends on the already loaded classes. In AbstractHorizontalMappingStrategy in the method rawExport(IDBStoreAccessor ...) (currently line 108) there is a for loop over all class mappings (line 122). These class mappings are lazily loaded (except during the first start of the repository). Class mappings which are not loaded at the moment of replication will not be transferred to the client. Btw I worked on a H2 store. Reproducible: Always
I added code to create all mappings on demand: public final Map<EClass, IClassMapping> getClassMappings(boolean createOnDemand) { if (createOnDemand) { synchronized (classMappings) { if (!allClassMappingsCreated) { createAllClassMappings(); allClassMappingsCreated = true; } } } return classMappings; } private void createAllClassMappings() { InternalRepository repository = (InternalRepository)getStore().getRepository(); InternalCDOPackageRegistry packageRegistry = repository.getPackageRegistry(false); for (InternalCDOPackageInfo packageInfo : packageRegistry.getPackageInfos()) { if (!packageInfo.isSystemPackage()) { for (EClassifier eClassifier : packageInfo.getEPackage().getEClassifiers()) { if (eClassifier instanceof EClass) { EClass eClass = (EClass)eClassifier; getClassMapping(eClass); // Get or create it } } } } }
Committed to HEAD
Reopening because of raw replication problems. If the emf model contains abstract types the replication fails with a db error message that a certain table does not exists (these are always abstract types). I'll attach a patch which seems to fix this problem... 1) The number of lines that you added/changed is smaller than 250. confirmed 2) You are the only author of these changed lines. confirmed 3) You apply the EPL to these changed lines. confirmed
Created attachment 171375 [details] Fix for abstract type mappings. build up class mappings only for non-abstract types.
Good catch! Thank you ;-) Committed to HEAD.
Available in 3.0 GA: http://download.eclipse.org/modeling/emf/cdo/updates/3.0-releases/