Skip to content

Commit

Permalink
Fixing error with in view profile page
Browse files Browse the repository at this point in the history
  • Loading branch information
Shetyo committed Aug 1, 2016
1 parent 9b22c33 commit 1181430
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/java/org/mamute/dao/ReputationEventDAO.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@ public KarmaByContextHistory karmaWonByQuestion(User user, DateTime after) {
@SuppressWarnings("unchecked")
private KarmaByContextHistory karmaByContext(User user, DateTime after, Integer maxResult) {
String hql = "select e.context.class, e.context.id, sum(e.karmaReward), " +
"concat(concat(year(e.date), '/', month(e.date)), '/', day(e.date)) " +
"e.date " +
"from ReputationEvent e "+
"where e.user = :user and e.date > :after " +
"group by e.context.class, e.context.id, concat(concat(year(e.date), '/', month(e.date)), '/', day(e.date)) " +
"order by year(e.date), month(e.date), day(e.date) desc";
"group by e.context.class, e.context.id, e.date " +
"order by e.date desc";

//get aggregate list
Query query = session.createQuery(hql).setParameter("user", user).setParameter("after", after);
Expand Down Expand Up @@ -97,7 +97,7 @@ private List<Object[]> fetchContextData(List<Object[]> rows){
organizedData.add(new Object[]{
context,
row[2],
DATE_FMT.parseDateTime((String) row[3])
row[3]
});
}

Expand Down

0 comments on commit 1181430

Please sign in to comment.