O'Reilly logo

Lift Application Development Cookbook by Gilberto T. Garcia Jr.

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 5. Working with Databases

In this chapter, we will cover the following topics:

  • Configuring a connection to database
  • Mapping a table to a Scala class
  • Creating one-to-many relationships
  • Creating many-to-many relationships
  • Creating CRUD features with CRUDify
  • Paginating result sets
  • Using an in-memory database in application tests

Introduction

We have learned how to create snippets, how to work with forms, and Ajax, how to test your code, and how to create a REST API, and all this is awesome! However, we did not learn how to persist data to make it durable.

In this chapter, we will see how to use Mapper, an object-relational mapping (ORM) system for relational databases, included with Lift.

The idea is to create a map of database tables into a well-organized ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required