From d6ab4a203affccb8cf2da8e1efbb3123b82bdf96 Mon Sep 17 00:00:00 2001 From: Strong Liu Date: Mon, 16 Jul 2012 20:50:20 +0800 Subject: [PATCH] HHH-7450 mapkey --- .../source/hbm/MapAttributeIndexSource.java | 4 +- .../source/hbm/MapAttributeSource.java | 4 +- .../org/hibernate/hibernate-mapping-4.0.xsd | 134 +++++++++--------- .../src/main/xjb/hbm-mapping-bindings.xjb | 4 +- 4 files changed, 72 insertions(+), 74 deletions(-) diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/internal/source/hbm/MapAttributeIndexSource.java b/hibernate-core/src/main/java/org/hibernate/metamodel/internal/source/hbm/MapAttributeIndexSource.java index a8309becf3..fb35bef546 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/internal/source/hbm/MapAttributeIndexSource.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/internal/source/hbm/MapAttributeIndexSource.java @@ -27,7 +27,7 @@ import java.util.List; import java.util.Map; import org.hibernate.internal.jaxb.mapping.hbm.JaxbIndexElement; -import org.hibernate.internal.jaxb.mapping.hbm.JaxbMapElement.JaxbMapKey; +import org.hibernate.internal.jaxb.mapping.hbm.JaxbMapKeyElement; import org.hibernate.metamodel.spi.source.ExplicitHibernateTypeSource; import org.hibernate.metamodel.spi.source.PluralAttributeIndexSource; import org.hibernate.metamodel.spi.source.RelationalValueSource; @@ -43,7 +43,7 @@ public class MapAttributeIndexSource extends AbstractHbmSourceNode implements Pl /** * @param sourceMappingDocument */ - public MapAttributeIndexSource( MappingDocument sourceMappingDocument, final JaxbMapKey mapKey ) { + public MapAttributeIndexSource( MappingDocument sourceMappingDocument, final JaxbMapKeyElement mapKey ) { super( sourceMappingDocument ); valueSources = Helper.buildValueSources( sourceMappingDocument(), new Helper.ValueSourcesAdapter() { diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/internal/source/hbm/MapAttributeSource.java b/hibernate-core/src/main/java/org/hibernate/metamodel/internal/source/hbm/MapAttributeSource.java index 439f17cc27..5fdef9ecef 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/internal/source/hbm/MapAttributeSource.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/internal/source/hbm/MapAttributeSource.java @@ -26,7 +26,7 @@ package org.hibernate.metamodel.internal.source.hbm; import org.hibernate.cfg.NotYetImplementedException; import org.hibernate.internal.jaxb.mapping.hbm.JaxbIndexElement; import org.hibernate.internal.jaxb.mapping.hbm.JaxbMapElement; -import org.hibernate.internal.jaxb.mapping.hbm.JaxbMapElement.JaxbMapKey; +import org.hibernate.internal.jaxb.mapping.hbm.JaxbMapKeyElement; import org.hibernate.metamodel.spi.source.AttributeSourceContainer; import org.hibernate.metamodel.spi.source.IndexedPluralAttributeSource; import org.hibernate.metamodel.spi.source.PluralAttributeNature; @@ -48,7 +48,7 @@ public class MapAttributeSource extends AbstractPluralAttributeSourceImpl implem JaxbMapElement mapElement, AttributeSourceContainer container ) { super( sourceMappingDocument, mapElement, container ); - JaxbMapKey mapKey = mapElement.getMapKey(); + JaxbMapKeyElement mapKey = mapElement.getMapKey(); if ( mapKey != null ) { this.indexSource = new MapAttributeIndexSource( sourceMappingDocument, mapKey ); } else { diff --git a/hibernate-core/src/main/resources/org/hibernate/hibernate-mapping-4.0.xsd b/hibernate-core/src/main/resources/org/hibernate/hibernate-mapping-4.0.xsd index 135ff2b789..5c95077d7d 100644 --- a/hibernate-core/src/main/resources/org/hibernate/hibernate-mapping-4.0.xsd +++ b/hibernate-core/src/main/resources/org/hibernate/hibernate-mapping-4.0.xsd @@ -977,7 +977,61 @@ arbitrary number of queries, and import declarations of arbitrary classes. - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -990,77 +1044,16 @@ arbitrary number of queries, and import declarations of arbitrary classes. - - - - - - - - - - - - - + - - - - - - - - - - - + - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + @@ -1111,6 +1104,11 @@ arbitrary number of queries, and import declarations of arbitrary classes. + + + + + diff --git a/hibernate-core/src/main/xjb/hbm-mapping-bindings.xjb b/hibernate-core/src/main/xjb/hbm-mapping-bindings.xjb index 74ecea7bd9..b1909e4ac0 100644 --- a/hibernate-core/src/main/xjb/hbm-mapping-bindings.xjb +++ b/hibernate-core/src/main/xjb/hbm-mapping-bindings.xjb @@ -127,10 +127,10 @@ - + - +