title: Does Slick handle a collection like List/Set etc?
body: <p>My question is:</p>
  
  <p>My Scala's case class has parameters where a collection(i.e., List) is a part of its constructor parameters, and I wonder how to map my case class into Slick style database table or tables if necessary?</p>
  
  <p>In other words, I would like to "Join tables in Slick way to map to a Json formatted case class, which is to be represented to the frontend (javascript) bits"?</p>
  
  <p>Please kindly give me a shout if my question is not clear enough.</p>
  
  <p>The same question is at:
  <a href="https://groups.google.com/forum/#!topic/scalaquery/QqZz_M-1VTg" rel="nofollow">https://groups.google.com/forum/#!topic/scalaquery/QqZz_M-1VTg</a></p>
  
  <p>For example,</p>
  
  <pre><code>case class ClassA (id: Int, lists: List[ClassB])
  
      object ClassA extends TableQuery(new ClassATable(_)) {
  
        // JSON formatter
  
  
          implicit val classAFormat: Format[ClassA] = (
              (JsPath \ "id").formatNullable[Int] and
                (JsPath \ "lists").format[List[ClassB]]
              )(ClassA.apply, unlift(ClassA.unapply))
          }
  
  
      case class ClassB (id: Int, name: String)
  
      object ClassB extends TableQuery(new ClassBTable(_)) {
      implicit val classBFormat: Format[ClassB] = (
                  (JsPath \ "id").formatNullable[Int] and
                    (JsPath \ "name").format[String]
                  )(ClassB.apply, unlift(ClassB.unapply))
              }
  </code></pre>
  
  <p>So, the missing bit is to create ClassATable and ClassBTable in such a way that there is a bi-directional relationship by means of each one's "id"?</p>
  
  <p>Many thanks,</p>