Fix byPrimaryKey problem.

This commit is contained in:
shimamoto
2013-07-01 21:09:59 +09:00
parent 87d8a19e37
commit 1fc91ee199
2 changed files with 3 additions and 3 deletions

View File

@@ -4,7 +4,7 @@ import scala.slick.driver.H2Driver.simple._
object IssueId extends Table[(String, String, Int)]("ISSUE_ID") with IssueTemplate { object IssueId extends Table[(String, String, Int)]("ISSUE_ID") with IssueTemplate {
def * = userName ~ repositoryName ~ issueId def * = userName ~ repositoryName ~ issueId
def byPrimaryKey = byRepository _ def byPrimaryKey(owner: String, repository: String) = byRepository(owner, repository)
} }
object Issues extends Table[Issue]("ISSUE") with IssueTemplate with MilestoneTemplate with Functions { object Issues extends Table[Issue]("ISSUE") with IssueTemplate with MilestoneTemplate with Functions {
@@ -17,7 +17,7 @@ object Issues extends Table[Issue]("ISSUE") with IssueTemplate with MilestoneTem
def updatedDate = column[java.util.Date]("UPDATED_DATE") def updatedDate = column[java.util.Date]("UPDATED_DATE")
def * = userName ~ repositoryName ~ issueId ~ openedUserName ~ milestoneId.? ~ assignedUserName.? ~ title ~ content.? ~ closed ~ registeredDate ~ updatedDate <> (Issue, Issue.unapply _) def * = userName ~ repositoryName ~ issueId ~ openedUserName ~ milestoneId.? ~ assignedUserName.? ~ title ~ content.? ~ closed ~ registeredDate ~ updatedDate <> (Issue, Issue.unapply _)
def byPrimaryKey = byIssue _ def byPrimaryKey(owner: String, repository: String, issueId: Int) = byIssue(owner, repository, issueId)
} }
case class Issue( case class Issue(

View File

@@ -11,7 +11,7 @@ object Repositories extends Table[Repository]("REPOSITORY") with BasicTemplate w
def lastActivityDate = column[java.util.Date]("LAST_ACTIVITY_DATE") def lastActivityDate = column[java.util.Date]("LAST_ACTIVITY_DATE")
def * = userName ~ repositoryName ~ isPrivate ~ description.? ~ defaultBranch ~ registeredDate ~ updatedDate ~ lastActivityDate <> (Repository, Repository.unapply _) def * = userName ~ repositoryName ~ isPrivate ~ description.? ~ defaultBranch ~ registeredDate ~ updatedDate ~ lastActivityDate <> (Repository, Repository.unapply _)
def byPrimaryKey = byRepository _ def byPrimaryKey(owner: String, repository: String) = byRepository(owner, repository)
} }
case class Repository( case class Repository(