Resolve length issue in Slick.

https://github.com/slick/slick/issues/170
This commit is contained in:
takezoe
2013-10-09 03:11:27 +09:00
parent fe23a5c6da
commit 72b25591a5
2 changed files with 4 additions and 11 deletions

View File

@@ -49,12 +49,8 @@ trait IssuesService {
* @return the count of the search result
*/
def countIssue(condition: IssueSearchCondition, filterUser: Map[String, String], onlyPullRequest: Boolean,
repos: (String, String)*): Int = {
// TODO It must be _.length instead of map (_.issueId) list).length.
// But it does not work on Slick 1.0.1 (worked on Slick 1.0.0).
// https://github.com/slick/slick/issues/170
(searchIssueQuery(repos, condition, filterUser, onlyPullRequest) map (_.issueId) list).length
}
repos: (String, String)*): Int =
Query(searchIssueQuery(repos, condition, filterUser, onlyPullRequest).length).first
/**
* Returns the Map which contains issue count for each labels.
*