summaryrefslogtreecommitdiffstats
path: root/store/sql_post_store.go
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2015-08-28 07:51:17 -0400
committerJoram Wilander <jwawilander@gmail.com>2015-08-28 07:51:17 -0400
commit2bc6451e39a4080832e0b6250f536972c42b1f48 (patch)
treed250f5271e5135a81e6115530c93024cdf82fec6 /store/sql_post_store.go
parent02bbe79aa2a71c5ebde342b2a73c3d142a359945 (diff)
parent879fa084c9bea87f655dc3025928a251a845980a (diff)
downloadchat-2bc6451e39a4080832e0b6250f536972c42b1f48.tar.gz
chat-2bc6451e39a4080832e0b6250f536972c42b1f48.tar.bz2
chat-2bc6451e39a4080832e0b6250f536972c42b1f48.zip
Merge pull request #486 from asubset/master
Fix getParentsPosts() query
Diffstat (limited to 'store/sql_post_store.go')
-rw-r--r--store/sql_post_store.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/store/sql_post_store.go b/store/sql_post_store.go
index f083a07c9..a94a1c014 100644
--- a/store/sql_post_store.go
+++ b/store/sql_post_store.go
@@ -379,7 +379,8 @@ func (s SqlPostStore) getParentsPosts(channelId string, offset int, limit int) S
ChannelId = :ChannelId1
AND DeleteAt = 0
ORDER BY CreateAt DESC
- LIMIT :Limit OFFSET :Offset) q3) q1 ON q1.RootId = q2.RootId
+ LIMIT :Limit OFFSET :Offset) q3
+ WHERE q3.RootId != '') q1 ON q1.RootId = q2.Id
WHERE
ChannelId = :ChannelId2
AND DeleteAt = 0