Created
June 8, 2015 19:01
-
-
Save Jacoby6000/0634e06cac1fb9cfdd83 to your computer and use it in GitHub Desktop.
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
case class Supplier(id: Int, name: String, street: String, city: String, state: String, zip: String) | |
object ExampleDatastore extends H2Datastore(mode = H2Memory("example"), columnNameAdapter = SnakeUpperCaseAdapter) { | |
object suppliers extends Table("SUPPLIERS", classOf[Supplier]) | |
} |
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
case class Supplier(id: Int, name: String, street: String, city: String, state: String, zip: String) | |
object ExampleDatastore extends H2Datastore(mode = H2Memory("example"), columnNameAdapter = SnakeUpperCaseAdapter) { | |
object suppliers extends Table("SUPPLIERS") { | |
val id = column[Int]("ID", PrimaryKey) | |
val name = column[String]("NAME") | |
val street = column[String]("STREET") | |
val city = column[String]("CITY") | |
val state = column[String]("STATE") | |
val zip = column[String]("ZIP") | |
} | |
} |
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
case class Supplier(id: Int, name: String, street: String, city: String, state: String, zip: String) | |
object ExampleDatastore extends H2Datastore(mode = H2Memory("example"), columnNameAdapter = SnakeUpperCaseAdapter) { | |
object suppliers extends Table("SUPPLIERS", classOf[Supplier]) { | |
val id = column[Int]("SUP_ID", PrimaryKey) | |
val name = column[String]("SUP_NAME") | |
} | |
} |
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
case class Supplier(id: Int, name: String, street: String, city: String, state: String, zip: String) | |
object ExampleDatastore extends H2Datastore(mode = H2Memory("example"), columnNameAdapter = SnakeUpperCaseAdapter) { | |
object suppliers extends Table("SUPPLIERS", classOf[Supplier]) { | |
val id = column[Int]("SUP_ID", PrimaryKey) | |
val name = column[String]("SUP_NAME") | |
val street = column[String]("STREET") | |
val city = column[String]("CITY") | |
val state = column[String]("STATE") | |
val zip = column[String]("ZIP") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Alternatively, add annotations to the case class fields for special column names