title: Play Scala Anorm One to Many relationship
body: <p>Coming from <a href="https://stackoverflow.com/questions/16666191/play-anorm-create-a-model-from-json-without-passing-anorm-pk-value-in-the-json">play anorm, create a model from json without passing anorm PK value in the json</a> I'm trying to add Seq[Address] to case class like</p>
  
  <pre><code>case class User(
    id: Pk[Long] = NotAssigned,
    name: String = "",
    email: String = "",
    addresses: Seq[Address])
  </code></pre>
  
  <p>Address is a simple object/class with three Strings. An user can have more than 1 address, how do I get all the addresses along with the User in findAll.</p>
  
  <pre><code>  def findAll(): Seq[User] = {
      Logger.info("select * from pt_users")
      DB.withConnection { implicit connection =&gt;
        SQL(
          """
            select * from pt_users where name like {query} limit {size} offset {offset}   
          """).as(User.list *)
      }
    }
  </code></pre>