Fix services to use shortcut method for primary key and foreign keys.

This commit is contained in:
takezoe
2013-06-29 13:40:01 +09:00
parent af79f558c3
commit bea6d156ed
8 changed files with 56 additions and 128 deletions

View File

@@ -6,7 +6,8 @@ object Collaborators extends Table[Collaborator]("COLLABORATOR") with BasicTempl
def collaboratorName = column[String]("COLLABORATOR_NAME")
def * = userName ~ repositoryName ~ collaboratorName <> (Collaborator, Collaborator.unapply _)
def byPrimaryKey = byRepository _
def byPrimaryKey(owner: String, repository: String, collaborator: String) =
byRepository(owner, repository) && (collaboratorName is collaborator.bind)
}
case class Collaborator(