Skip to content

Instantly share code, notes, and snippets.

@wfaler
Created February 2, 2011 01:00
Show Gist options
  • Save wfaler/807057 to your computer and use it in GitHub Desktop.
Save wfaler/807057 to your computer and use it in GitHub Desktop.
crudsetup.scala
import org.squeryl.Schema
// setup Squeryl Schema with a single entity type/table
object Library extends Schema {
val authors = table[Author]("authors")
}
// setup CRUD Controller - gives you full CRUD serverside behavior with JSON rendering etc!
val dao = new LongKeyedDao[Author](authors)
val controller = new CrudController[Author, Long](dao, "authors")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment