dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #40541
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 20577: minor fix in property introspector, also treat customtype as single column type (in our case, it ...
------------------------------------------------------------
revno: 20577
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2015-10-08 11:16:40 +0700
message:
minor fix in property introspector, also treat customtype as single column type (in our case, it is used only for enums)
modified:
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/schema/AbstractPropertyIntrospectorService.java
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/schema/AbstractPropertyIntrospectorService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/schema/AbstractPropertyIntrospectorService.java 2015-09-13 21:12:28 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/schema/AbstractPropertyIntrospectorService.java 2015-10-08 04:16:40 +0000
@@ -40,6 +40,7 @@
import org.hibernate.persister.entity.Joinable;
import org.hibernate.type.AssociationType;
import org.hibernate.type.CollectionType;
+import org.hibernate.type.CustomType;
import org.hibernate.type.DoubleType;
import org.hibernate.type.IntegerType;
import org.hibernate.type.LongType;
@@ -57,6 +58,7 @@
import org.hisp.dhis.common.DimensionalObject;
import org.hisp.dhis.common.IdentifiableObject;
import org.hisp.dhis.common.NameableObject;
+import org.hisp.dhis.dataelement.DataElement;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.orm.hibernate4.LocalSessionFactoryBean;
@@ -274,7 +276,7 @@
property.setOneToOne( true );
}
- if ( SingleColumnType.class.isInstance( type ) )
+ if ( SingleColumnType.class.isInstance( type ) || CustomType.class.isInstance( type ) )
{
Column column = (Column) hibernateProperty.getColumnIterator().next();