Produces: type mismatch; found : (Int, Int) required: (Int, Int) SO13885423.scala ... line 19
Created
December 14, 2012 20:39
-
-
Save rnix/4288479 to your computer and use it in GitHub Desktop.
SO13885423
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name := "so" | |
version := "1.0" | |
scalaVersion := "2.9.2" | |
resolvers ++= Seq( | |
"scalaquery" at "http://scala-tools.org/repo-releases" | |
) | |
libraryDependencies ++= Seq( | |
"org.scalaquery" % "scalaquery_2.9.1-1" % "0.10.0-M1" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package so | |
import org.scalaquery.session._ | |
import org.scalaquery.ql.basic.{ BasicTable => Table } | |
import org.scalaquery.ql.TypeMapper._ | |
import org.scalaquery.ql._ | |
import org.scalaquery.ql.basic.BasicDriver.Implicit._ | |
object M extends Table[(Int, Int)]("M") { | |
def id = column[Int]("id") | |
def n = column[Int]("n") | |
def * = id ~ n | |
type T = (Int, Int) | |
def apply(v: T) = 1 | |
def main(args: Array[String]): Unit = { | |
DB.db withSession { s: Session => (for (r <- M) yield M(*)).list()(s) } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment