r7309 - in dumbhippo/trunk/server: src/com/dumbhippo/server/impl tests/com/dumbhippo/dm/dm



Author: otaylor
Date: 2008-02-11 17:27:03 -0600 (Mon, 11 Feb 2008)
New Revision: 7309

Modified:
   dumbhippo/trunk/server/src/com/dumbhippo/server/impl/MusicSystemBean.java
   dumbhippo/trunk/server/tests/com/dumbhippo/dm/dm/TestUserDMO.java
Log:
Fix passing timestamps to Hibernate

Modified: dumbhippo/trunk/server/src/com/dumbhippo/server/impl/MusicSystemBean.java
===================================================================
--- dumbhippo/trunk/server/src/com/dumbhippo/server/impl/MusicSystemBean.java	2008-02-11 21:05:22 UTC (rev 7308)
+++ dumbhippo/trunk/server/src/com/dumbhippo/server/impl/MusicSystemBean.java	2008-02-11 23:27:03 UTC (rev 7309)
@@ -322,7 +322,7 @@
 		q = em.createQuery("FROM TrackHistory h WHERE h.user = :user " + select + order);
 		q.setParameter("user", user);
 		if (minTimestamp > 0)
-			q.setParameter("minTimestamp", minTimestamp);
+			q.setParameter("minTimestamp", new Date(minTimestamp));
 		q.setFirstResult(firstResult);
 		q.setMaxResults(maxResults);
 		

Modified: dumbhippo/trunk/server/tests/com/dumbhippo/dm/dm/TestUserDMO.java
===================================================================
--- dumbhippo/trunk/server/tests/com/dumbhippo/dm/dm/TestUserDMO.java	2008-02-11 21:05:22 UTC (rev 7308)
+++ dumbhippo/trunk/server/tests/com/dumbhippo/dm/dm/TestUserDMO.java	2008-02-11 23:27:03 UTC (rev 7309)
@@ -113,7 +113,7 @@
 					);
 
 			q.setParameter("user", user);
-			q.setParameter("minTimestamp", minTimestamp);
+			q.setParameter("minTimestamp", new Date(minTimestamp));
 			
 			q.setFirstResult(start);
 			q.setMaxResults(max);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]