Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Taal2012-12-18 11:11:29 +0000
committerMartin Taal2012-12-18 11:11:29 +0000
commiteffeaf2f4da2e674af6400845bb589495a2bd6dc (patch)
tree19a8f4fe1d410710ff6dd44c992d57db083c101c
parent1237dbf76875a4c467c4701f7288431c86cdfd29 (diff)
downloadcdo-drops/I20121221-0410.tar.gz
cdo-drops/I20121221-0410.tar.xz
cdo-drops/I20121221-0410.zip
[393665] - [Hibernate] seemingly unrelated select statements executed, support proxydrops/I20121221-0410
-rw-r--r--plugins/org.eclipse.emf.cdo.server.hibernate.teneo/src/org/eclipse/emf/cdo/server/hibernate/teneo/CDOMappingContext.java7
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.hibernate/src/app.properties2
2 files changed, 9 insertions, 0 deletions
diff --git a/plugins/org.eclipse.emf.cdo.server.hibernate.teneo/src/org/eclipse/emf/cdo/server/hibernate/teneo/CDOMappingContext.java b/plugins/org.eclipse.emf.cdo.server.hibernate.teneo/src/org/eclipse/emf/cdo/server/hibernate/teneo/CDOMappingContext.java
index 1b80865dcd..04d1af0f7c 100644
--- a/plugins/org.eclipse.emf.cdo.server.hibernate.teneo/src/org/eclipse/emf/cdo/server/hibernate/teneo/CDOMappingContext.java
+++ b/plugins/org.eclipse.emf.cdo.server.hibernate.teneo/src/org/eclipse/emf/cdo/server/hibernate/teneo/CDOMappingContext.java
@@ -11,6 +11,7 @@
*/
package org.eclipse.emf.cdo.server.hibernate.teneo;
+import org.eclipse.emf.cdo.common.revision.CDORevision;
import org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDOCustomTypeUserType;
import org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDOENumIntegerType;
import org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDOENumStringType;
@@ -49,6 +50,12 @@ public class CDOMappingContext extends MappingContext
tuplizerElement = new Element("tuplizer").addAttribute("entity-mode", "pojo").addAttribute("class", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
CDORevisionTuplizer.class.getName());
entityElement.add(0, tuplizerElement);
+
+ if (entityElement.getAttributeValue("name") != null)
+ {
+ entityElement.addAttribute("proxy", CDORevision.class.getName());
+ entityElement.removeAttribute("name");
+ }
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo.tests.hibernate/src/app.properties b/plugins/org.eclipse.emf.cdo.tests.hibernate/src/app.properties
index ac2e5672fa..df7a7639af 100644
--- a/plugins/org.eclipse.emf.cdo.tests.hibernate/src/app.properties
+++ b/plugins/org.eclipse.emf.cdo.tests.hibernate/src/app.properties
@@ -2,6 +2,8 @@ hibernate.hbm2ddl.auto=create-drop
hibernate.show_sql=false
hibernate.connection.pool_size=10
+teneo.mapping.set_proxy=true
+
# -----------------------------------------------------------
# DEFAULT SETTINGS FOR IN MEMORY HSQLDB DATABASE.
#

Back to the top