HHH-5182 - Inject SessionFactory into "non-basic" Types

git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@19385 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
Steve Ebersole 2010-05-06 13:34:06 +00:00
parent 7c27fc9f2a
commit b20523cc8a
7 changed files with 10 additions and 7 deletions

View File

@ -38,6 +38,6 @@ public class ArrayBinder extends ListBinder {
} }
protected Collection createCollection(PersistentClass persistentClass) { protected Collection createCollection(PersistentClass persistentClass) {
return new Array( persistentClass ); return new Array( getMappings(), persistentClass );
} }
} }

View File

@ -225,7 +225,9 @@ public abstract class CollectionBinder {
public void setSqlOrderBy(OrderBy orderByAnn) { public void setSqlOrderBy(OrderBy orderByAnn) {
if ( orderByAnn != null ) { if ( orderByAnn != null ) {
if ( !BinderHelper.isDefault( orderByAnn.clause() ) ) orderBy = orderByAnn.clause(); if ( !BinderHelper.isDefault( orderByAnn.clause() ) ) {
orderBy = orderByAnn.clause();
}
} }
} }

View File

@ -50,7 +50,7 @@ import org.hibernate.util.StringHelper;
*/ */
public class IdBagBinder extends BagBinder { public class IdBagBinder extends BagBinder {
protected Collection createCollection(PersistentClass persistentClass) { protected Collection createCollection(PersistentClass persistentClass) {
return new org.hibernate.mapping.IdentifierBag( persistentClass ); return new org.hibernate.mapping.IdentifierBag( getMappings(), persistentClass );
} }
@Override @Override

View File

@ -63,7 +63,7 @@ public class ListBinder extends CollectionBinder {
} }
protected Collection createCollection(PersistentClass persistentClass) { 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) { public void setSqlOrderBy(OrderBy orderByAnn) {

View File

@ -88,7 +88,7 @@ public class MapBinder extends CollectionBinder {
} }
protected Collection createCollection(PersistentClass persistentClass) { protected Collection createCollection(PersistentClass persistentClass) {
return new org.hibernate.mapping.Map( persistentClass ); return new org.hibernate.mapping.Map( getMappings(), persistentClass );
} }
@Override @Override

View File

@ -33,6 +33,6 @@ import org.hibernate.mapping.PrimitiveArray;
public class PrimitiveArrayBinder extends ArrayBinder { public class PrimitiveArrayBinder extends ArrayBinder {
@Override @Override
protected Collection createCollection(PersistentClass persistentClass) { protected Collection createCollection(PersistentClass persistentClass) {
return new PrimitiveArray( persistentClass ); return new PrimitiveArray( getMappings(), persistentClass );
} }
} }

View File

@ -46,10 +46,11 @@ public class SetBinder extends CollectionBinder {
} }
protected Collection createCollection(PersistentClass persistentClass) { 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) { public void setSqlOrderBy(OrderBy orderByAnn) {
// *annotation* binder, jdk 1.5, ... am i missing something?
if ( orderByAnn != null ) { if ( orderByAnn != null ) {
if ( Environment.jvmSupportsLinkedHashCollections() ) { if ( Environment.jvmSupportsLinkedHashCollections() ) {
super.setSqlOrderBy( orderByAnn ); super.setSqlOrderBy( orderByAnn );