diff --git a/annotations/src/main/java/org/hibernate/cfg/annotations/ArrayBinder.java b/annotations/src/main/java/org/hibernate/cfg/annotations/ArrayBinder.java index 00c1eb9074..16b0649542 100644 --- a/annotations/src/main/java/org/hibernate/cfg/annotations/ArrayBinder.java +++ b/annotations/src/main/java/org/hibernate/cfg/annotations/ArrayBinder.java @@ -38,6 +38,6 @@ public class ArrayBinder extends ListBinder { } protected Collection createCollection(PersistentClass persistentClass) { - return new Array( persistentClass ); + return new Array( getMappings(), persistentClass ); } } diff --git a/annotations/src/main/java/org/hibernate/cfg/annotations/CollectionBinder.java b/annotations/src/main/java/org/hibernate/cfg/annotations/CollectionBinder.java index 63a7650a12..687385a68b 100644 --- a/annotations/src/main/java/org/hibernate/cfg/annotations/CollectionBinder.java +++ b/annotations/src/main/java/org/hibernate/cfg/annotations/CollectionBinder.java @@ -225,7 +225,9 @@ public abstract class CollectionBinder { public void setSqlOrderBy(OrderBy orderByAnn) { if ( orderByAnn != null ) { - if ( !BinderHelper.isDefault( orderByAnn.clause() ) ) orderBy = orderByAnn.clause(); + if ( !BinderHelper.isDefault( orderByAnn.clause() ) ) { + orderBy = orderByAnn.clause(); + } } } diff --git a/annotations/src/main/java/org/hibernate/cfg/annotations/IdBagBinder.java b/annotations/src/main/java/org/hibernate/cfg/annotations/IdBagBinder.java index d4ad482343..903e8e920a 100644 --- a/annotations/src/main/java/org/hibernate/cfg/annotations/IdBagBinder.java +++ b/annotations/src/main/java/org/hibernate/cfg/annotations/IdBagBinder.java @@ -50,7 +50,7 @@ import org.hibernate.util.StringHelper; */ public class IdBagBinder extends BagBinder { protected Collection createCollection(PersistentClass persistentClass) { - return new org.hibernate.mapping.IdentifierBag( persistentClass ); + return new org.hibernate.mapping.IdentifierBag( getMappings(), persistentClass ); } @Override diff --git a/annotations/src/main/java/org/hibernate/cfg/annotations/ListBinder.java b/annotations/src/main/java/org/hibernate/cfg/annotations/ListBinder.java index 58730291a0..09502c7786 100644 --- a/annotations/src/main/java/org/hibernate/cfg/annotations/ListBinder.java +++ b/annotations/src/main/java/org/hibernate/cfg/annotations/ListBinder.java @@ -63,7 +63,7 @@ public class ListBinder extends CollectionBinder { } protected Collection createCollection(PersistentClass persistentClass) { - return new org.hibernate.mapping.List( persistentClass ); + return new org.hibernate.mapping.List( getMappings(), persistentClass ); } public void setSqlOrderBy(OrderBy orderByAnn) { diff --git a/annotations/src/main/java/org/hibernate/cfg/annotations/MapBinder.java b/annotations/src/main/java/org/hibernate/cfg/annotations/MapBinder.java index ad0533113c..c4e214061c 100644 --- a/annotations/src/main/java/org/hibernate/cfg/annotations/MapBinder.java +++ b/annotations/src/main/java/org/hibernate/cfg/annotations/MapBinder.java @@ -88,7 +88,7 @@ public class MapBinder extends CollectionBinder { } protected Collection createCollection(PersistentClass persistentClass) { - return new org.hibernate.mapping.Map( persistentClass ); + return new org.hibernate.mapping.Map( getMappings(), persistentClass ); } @Override diff --git a/annotations/src/main/java/org/hibernate/cfg/annotations/PrimitiveArrayBinder.java b/annotations/src/main/java/org/hibernate/cfg/annotations/PrimitiveArrayBinder.java index 80a82b6ee3..f94838767f 100644 --- a/annotations/src/main/java/org/hibernate/cfg/annotations/PrimitiveArrayBinder.java +++ b/annotations/src/main/java/org/hibernate/cfg/annotations/PrimitiveArrayBinder.java @@ -33,6 +33,6 @@ import org.hibernate.mapping.PrimitiveArray; public class PrimitiveArrayBinder extends ArrayBinder { @Override protected Collection createCollection(PersistentClass persistentClass) { - return new PrimitiveArray( persistentClass ); + return new PrimitiveArray( getMappings(), persistentClass ); } } diff --git a/annotations/src/main/java/org/hibernate/cfg/annotations/SetBinder.java b/annotations/src/main/java/org/hibernate/cfg/annotations/SetBinder.java index 0863013cad..c7858fe6d1 100644 --- a/annotations/src/main/java/org/hibernate/cfg/annotations/SetBinder.java +++ b/annotations/src/main/java/org/hibernate/cfg/annotations/SetBinder.java @@ -46,10 +46,11 @@ public class SetBinder extends CollectionBinder { } protected Collection createCollection(PersistentClass persistentClass) { - return new org.hibernate.mapping.Set( persistentClass ); + return new org.hibernate.mapping.Set( getMappings(), persistentClass ); } public void setSqlOrderBy(OrderBy orderByAnn) { + // *annotation* binder, jdk 1.5, ... am i missing something? if ( orderByAnn != null ) { if ( Environment.jvmSupportsLinkedHashCollections() ) { super.setSqlOrderBy( orderByAnn );