dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #21665
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 10316: Hibernate generic store, using Timestamp instead of Date in queries on lastupdated and created pr...
------------------------------------------------------------
revno: 10316
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2013-03-19 15:50:43 +0100
message:
Hibernate generic store, using Timestamp instead of Date in queries on lastupdated and created properties since they in fact are time stamps
modified:
dhis-2/dhis-support/dhis-support-hibernate/src/main/java/org/hisp/dhis/hibernate/HibernateGenericStore.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-support/dhis-support-hibernate/src/main/java/org/hisp/dhis/hibernate/HibernateGenericStore.java'
--- dhis-2/dhis-support/dhis-support-hibernate/src/main/java/org/hisp/dhis/hibernate/HibernateGenericStore.java 2013-03-19 12:53:04 +0000
+++ dhis-2/dhis-support/dhis-support-hibernate/src/main/java/org/hisp/dhis/hibernate/HibernateGenericStore.java 2013-03-19 14:50:43 +0000
@@ -736,7 +736,7 @@
Query query = getQuery( hql );
query.setEntity( "user", currentUserService.getCurrentUser() );
- query.setDate( "lastUpdated", lastUpdated );
+ query.setTimestamp( "lastUpdated", lastUpdated );
return query;
}
@@ -744,7 +744,7 @@
private Query getQueryCountGeLastUpdated( Date lastUpdated )
{
Query query = getQuery( "select count(distinct c) from " + clazz.getName() + " c where lastUpdated >= :lastUpdated" );
- query.setDate( "lastUpdated", lastUpdated );
+ query.setTimestamp( "lastUpdated", lastUpdated );
return query;
}
@@ -768,7 +768,7 @@
Query query = getQuery( hql );
query.setEntity( "user", currentUserService.getCurrentUser() );
- query.setDate( "lastUpdated", lastUpdated );
+ query.setTimestamp( "lastUpdated", lastUpdated );
return query;
}
@@ -776,7 +776,7 @@
private Query getQueryAllGeLastUpdated( Date lastUpdated )
{
Query query = getQuery( "from " + clazz.getName() + " c where c.lastUpdated >= :lastUpdated" );
- query.setDate( "lastUpdated", lastUpdated );
+ query.setTimestamp( "lastUpdated", lastUpdated );
return query;
}
@@ -800,7 +800,7 @@
Query query = getQuery( hql );
query.setEntity( "user", currentUserService.getCurrentUser() );
- query.setDate( "created", created );
+ query.setTimestamp( "created", created );
return query;
}
@@ -808,7 +808,7 @@
private Query getQueryAllGeCreated( Date created )
{
Query query = getQuery( "from " + clazz.getName() + " c where c.created >= :created" );
- query.setDate( "created", created );
+ query.setTimestamp( "created", created );
return query;
}
@@ -832,7 +832,7 @@
Query query = getQuery( hql );
query.setEntity( "user", currentUserService.getCurrentUser() );
- query.setDate( "lastUpdated", lastUpdated );
+ query.setTimestamp( "lastUpdated", lastUpdated );
return query;
}
@@ -840,7 +840,7 @@
private Query getQueryAllGeLastUpdatedOrderedName( Date lastUpdated )
{
Query query = getQuery( "from " + clazz.getName() + " c where c.lastUpdated >= :lastUpdated order by c.name" );
- query.setDate( "lastUpdated", lastUpdated );
+ query.setTimestamp( "lastUpdated", lastUpdated );
return query;
}