← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 12912: Messages, fixed bug with background process failure alerts. Using left join on lastsenderid since...

 

------------------------------------------------------------
revno: 12912
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2013-11-10 21:16:56 +0100
message:
  Messages, fixed bug with background process failure alerts. Using left join on lastsenderid since there will be no sender for system notifications.
modified:
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/message/hibernate/HibernateMessageConversationStore.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/message/hibernate/HibernateMessageConversationStore.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/message/hibernate/HibernateMessageConversationStore.java	2013-09-19 17:34:52 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/message/hibernate/HibernateMessageConversationStore.java	2013-11-10 20:16:56 +0000
@@ -74,7 +74,7 @@
             "from messageconversation mc " +
             "inner join messageconversation_usermessages mu on mc.messageconversationid=mu.messageconversationid " +
             "inner join usermessage um on mu.usermessageid=um.usermessageid " +
-            "inner join userinfo ui on mc.lastsenderid=ui.userinfoid ";
+            "left join userinfo ui on mc.lastsenderid=ui.userinfoid ";
 
         if ( user != null )
         {
@@ -148,12 +148,11 @@
         {
             return -1;
         }
-        
+            
         String hql = "select count(*) from MessageConversation m join m.userMessages u where u.user = :user and u.read = false";
 
         Query query = getQuery( hql );
         query.setEntity( "user", user );
-        query.setCacheable( true );
 
         return (Long) query.uniqueResult();
     }