minor changes for CdmModelCacher
authorAndreas Müller <a.mueller@bgbm.org>
Mon, 14 May 2018 11:51:19 +0000 (13:51 +0200)
committerAndreas Müller <a.mueller@bgbm.org>
Mon, 14 May 2018 11:51:35 +0000 (13:51 +0200)
cdmlib-cache/src/main/java/eu/etaxonomy/cdm/cache/CdmModelCacherConnectionProvider.java
cdmlib-cache/src/main/resources/eu/etaxonomy/cdm/mappings/hibernate.cfg.xml

index 061c7d28c3f1c8de0a8fe91f3a7e838586b4038e..b5ece7835d8b5efb1d97c00a057b3a9992f6d4f9 100644 (file)
@@ -7,13 +7,13 @@ import org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProvid
 import eu.etaxonomy.cdm.database.CdmDataSource;
 
 /**
- * This is a very preliminary class to get the model cache running. Need to better understand how 
+ * This is a very preliminary class to get the model cache running. Need to better understand how
  * the datasource works with hibernate service registry before implementing the correct way.
 
  * Or use a running source.
- * 
- * When changing this class please also adapt https://dev.e-taxonomy.eu/redmine/projects/edit/wiki/TaxonomicEditorDevelopersGuide#Model-Change-Actions 
- * 
+ *
+ * When changing this class please also adapt https://dev.e-taxonomy.eu/redmine/projects/edit/wiki/TaxonomicEditorDevelopersGuide#Model-Change-Actions
+ *
  * @author a.mueller
  *
  */
@@ -26,13 +26,13 @@ public class CdmModelCacherConnectionProvider extends DatasourceConnectionProvid
        }
 
        private DataSource getDataSourcePreliminary() {
-               String database = "xyz";
+               String database = "modelCacher";
                String path = "C:\\Users\\a.mueller\\.cdmLibrary\\writableResources\\h2\\LocalH2_" + database;
         String username = "sa";
         CdmDataSource dataSource = CdmDataSource.NewH2EmbeddedInstance("cdmTest", username, "", path);
         return dataSource;
        }
-       
-       
+
+
 
 }
index d4f61d96c41abbb4b955af478e057167d0cefb8d..4697ef453326bad1d5279993d535aa07705339d3 100644 (file)
@@ -3,6 +3,12 @@
  "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
  "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
 
+<!-- This is a copy of cdmlib-persistence/src/main/resources/eu/etaxonomy/cdm/hibernate/hibernate.cfg.xml. If the former changes in the mapping part *this* file needs to be changed accordingly.
+Difference are to be found in 
+ * <property name="hibernate.implicit_naming_strategy">   which is missing in the original file
+ * <property name="hibernate.connection.provider_class" which has a differen value in the original file
+-->
 <hibernate-configuration>
     <session-factory>
 
       <mapping class="eu.etaxonomy.cdm.model.location.Country"/>
       <!-- Media Package -->
       <mapping class="eu.etaxonomy.cdm.model.media.AudioFile"/>
+      <mapping class="eu.etaxonomy.cdm.model.media.ExternalLink"/>
       <mapping class="eu.etaxonomy.cdm.model.media.ImageFile"/>
       <mapping class="eu.etaxonomy.cdm.model.media.Media"/>
       <mapping class="eu.etaxonomy.cdm.model.media.MediaRepresentation"/>