Add the condition function by the primary key.

This commit is contained in:
shimamoto
2013-06-29 04:44:29 +09:00
parent c7d6a56ea2
commit a3133fa128
7 changed files with 14 additions and 0 deletions

View File

@@ -4,6 +4,8 @@ import scala.slick.driver.H2Driver.simple._
object IssueLabels extends Table[IssueLabel]("ISSUE_LABEL") with IssueTemplate with LabelTemplate {
def * = userName ~ repositoryName ~ issueId ~ labelId <> (IssueLabel, IssueLabel.unapply _)
def byPrimaryKey(owner: String, repository: String, issueId: Int, labelId: Int) =
byIssue(owner, repository, issueId) && (this.labelId is labelId.bind)
}
case class IssueLabel(