=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/common/IdentityPopulator.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/common/IdentityPopulator.java 2011-11-03 09:13:21 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/common/IdentityPopulator.java 2011-11-03 10:11:33 +0000
@@ -6,6 +6,8 @@
import java.sql.SQLException;
import java.sql.Statement;
+import java.sql.Timestamp;
+import java.util.Date;
import java.util.UUID;
import java.util.logging.Level;
import java.util.logging.Logger;
@@ -59,7 +61,8 @@
"indicatorgroup", "datadictionary", "validationrulegroup", "validationrule",
"dataset", "orgunitlevel", "organisationunit", "orgunitgroup",
"orgunitgroupset", "dataelementcategoryoption", "dataelementgroup",
- "dataelement", "dataelementgroupset", "dataelementcategory", "categorycombo"
+ "dataelement", "dataelementgroupset", "dataelementcategory", "categorycombo",
+ "categoryoptioncombo"
};
// -------------------------------------------------------------------------
@@ -122,7 +125,21 @@
{
log.info( count + " uuids updated on " + table );
}
-
+
+ Timestamp now = new Timestamp (new Date().getTime());
+
+ resultSet = statement.executeQuery( "SELECT * from " + table + " WHERE lastUpdated IS NULL" );
+ while ( resultSet.next() )
+ {
+ ++count;
+ resultSet.updateTimestamp( "lastUpdated", now);
+ resultSet.updateRow();
+ }
+ if ( count > 0 )
+ {
+ log.info( count + " timestamps updated on " + table );
+ }
+
} catch ( SQLException ex )
{
Logger.getLogger( IdentityPopulator.class.getName() ).log( Level.SEVERE, null, ex );
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataelement/hibernate/DataElementCategoryOptionCombo.hbm.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataelement/hibernate/DataElementCategoryOptionCombo.hbm.xml 2011-08-17 09:25:09 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataelement/hibernate/DataElementCategoryOptionCombo.hbm.xml 2011-11-03 10:11:33 +0000
@@ -8,14 +8,16 @@
-
+
-
-
-
-
+
+
+
+
+
+
@@ -27,6 +29,6 @@
-
+