Author: steve.ebersole(a)jboss.com
Date: 2010-05-06 09:34:06 -0400 (Thu, 06 May 2010)
New Revision: 19385
Modified:
core/trunk/annotations/src/main/java/org/hibernate/cfg/annotations/ArrayBinder.java
core/trunk/annotations/src/main/java/org/hibernate/cfg/annotations/CollectionBinder.java
core/trunk/annotations/src/main/java/org/hibernate/cfg/annotations/IdBagBinder.java
core/trunk/annotations/src/main/java/org/hibernate/cfg/annotations/ListBinder.java
core/trunk/annotations/src/main/java/org/hibernate/cfg/annotations/MapBinder.java
core/trunk/annotations/src/main/java/org/hibernate/cfg/annotations/PrimitiveArrayBinder.java
core/trunk/annotations/src/main/java/org/hibernate/cfg/annotations/SetBinder.java
Log:
HHH-5182 - Inject SessionFactory into "non-basic" Types
Modified:
core/trunk/annotations/src/main/java/org/hibernate/cfg/annotations/ArrayBinder.java
===================================================================
---
core/trunk/annotations/src/main/java/org/hibernate/cfg/annotations/ArrayBinder.java 2010-05-06
13:16:48 UTC (rev 19384)
+++
core/trunk/annotations/src/main/java/org/hibernate/cfg/annotations/ArrayBinder.java 2010-05-06
13:34:06 UTC (rev 19385)
@@ -38,6 +38,6 @@
}
protected Collection createCollection(PersistentClass persistentClass) {
- return new Array( persistentClass );
+ return new Array( getMappings(), persistentClass );
}
}
Modified:
core/trunk/annotations/src/main/java/org/hibernate/cfg/annotations/CollectionBinder.java
===================================================================
---
core/trunk/annotations/src/main/java/org/hibernate/cfg/annotations/CollectionBinder.java 2010-05-06
13:16:48 UTC (rev 19384)
+++
core/trunk/annotations/src/main/java/org/hibernate/cfg/annotations/CollectionBinder.java 2010-05-06
13:34:06 UTC (rev 19385)
@@ -225,7 +225,9 @@
public void setSqlOrderBy(OrderBy orderByAnn) {
if ( orderByAnn != null ) {
- if ( !BinderHelper.isDefault( orderByAnn.clause() ) ) orderBy = orderByAnn.clause();
+ if ( !BinderHelper.isDefault( orderByAnn.clause() ) ) {
+ orderBy = orderByAnn.clause();
+ }
}
}
Modified:
core/trunk/annotations/src/main/java/org/hibernate/cfg/annotations/IdBagBinder.java
===================================================================
---
core/trunk/annotations/src/main/java/org/hibernate/cfg/annotations/IdBagBinder.java 2010-05-06
13:16:48 UTC (rev 19384)
+++
core/trunk/annotations/src/main/java/org/hibernate/cfg/annotations/IdBagBinder.java 2010-05-06
13:34:06 UTC (rev 19385)
@@ -50,7 +50,7 @@
*/
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
Modified:
core/trunk/annotations/src/main/java/org/hibernate/cfg/annotations/ListBinder.java
===================================================================
---
core/trunk/annotations/src/main/java/org/hibernate/cfg/annotations/ListBinder.java 2010-05-06
13:16:48 UTC (rev 19384)
+++
core/trunk/annotations/src/main/java/org/hibernate/cfg/annotations/ListBinder.java 2010-05-06
13:34:06 UTC (rev 19385)
@@ -63,7 +63,7 @@
}
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) {
Modified:
core/trunk/annotations/src/main/java/org/hibernate/cfg/annotations/MapBinder.java
===================================================================
---
core/trunk/annotations/src/main/java/org/hibernate/cfg/annotations/MapBinder.java 2010-05-06
13:16:48 UTC (rev 19384)
+++
core/trunk/annotations/src/main/java/org/hibernate/cfg/annotations/MapBinder.java 2010-05-06
13:34:06 UTC (rev 19385)
@@ -88,7 +88,7 @@
}
protected Collection createCollection(PersistentClass persistentClass) {
- return new org.hibernate.mapping.Map( persistentClass );
+ return new org.hibernate.mapping.Map( getMappings(), persistentClass );
}
@Override
Modified:
core/trunk/annotations/src/main/java/org/hibernate/cfg/annotations/PrimitiveArrayBinder.java
===================================================================
---
core/trunk/annotations/src/main/java/org/hibernate/cfg/annotations/PrimitiveArrayBinder.java 2010-05-06
13:16:48 UTC (rev 19384)
+++
core/trunk/annotations/src/main/java/org/hibernate/cfg/annotations/PrimitiveArrayBinder.java 2010-05-06
13:34:06 UTC (rev 19385)
@@ -33,6 +33,6 @@
public class PrimitiveArrayBinder extends ArrayBinder {
@Override
protected Collection createCollection(PersistentClass persistentClass) {
- return new PrimitiveArray( persistentClass );
+ return new PrimitiveArray( getMappings(), persistentClass );
}
}
Modified:
core/trunk/annotations/src/main/java/org/hibernate/cfg/annotations/SetBinder.java
===================================================================
---
core/trunk/annotations/src/main/java/org/hibernate/cfg/annotations/SetBinder.java 2010-05-06
13:16:48 UTC (rev 19384)
+++
core/trunk/annotations/src/main/java/org/hibernate/cfg/annotations/SetBinder.java 2010-05-06
13:34:06 UTC (rev 19385)
@@ -46,10 +46,11 @@
}
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 );
Show replies by date