Skip to content

Instantly share code, notes, and snippets.

@dsugden
Created January 21, 2013 01:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dsugden/4582917 to your computer and use it in GitHub Desktop.
Save dsugden/4582917 to your computer and use it in GitHub Desktop.
def update(article: ArticleForUpdate): Try[Unit] = database.withSession { implicit db: Session =>
Try((ArticleTable.filter(a => a.id === article.id).map(a => a.name ~ a.body ~ a.displayOrder))
.update(article.name, article.body, article.displayOrder))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment