title: Anorm and get[Double]
body: <p>I'm still trying to get the hang of certain aspects of scala, Play and anorm. Now, Iǘe read all the manuals and online documentation, but I just can seem to find a satisfying solution for my problem.</p>
  
  <p>I have the following code for retreiving an object called MyThing:</p>
  
  <pre><code>case class MyThing(val code: String, val type:String, val value: Double, var id:Long)
  
  object MyThing{
  
    val myThingConverter = {
      get[String]("type") ~ get[String]("code")~get[Double]("value") ~ get[Long]("id") match {
        case type ~ code ~ value ~ id  =&gt;
          MyThing( "test", " test", value ,  213 )
      }
    }
  
  
    val loadQuery =
      """
          "select  * from THINGS where id = {id}"
      """
  
    def loadThings(id: Long): Option[Thing] = {
      DB.withConnection {
        implicit c =&gt;
          SQL(loadQuery)
            .on('id -&gt; id).as(myThingConvert *)
      }.headOption
  }
  </code></pre>
  
  <p>The problem is that an error is given at the part 'MyThing( "test", " test", value ,  213 )' . The error is for "value" :</p>
  
  <pre><code>Type mismatch, expected: Double: actual: Any
  </code></pre>
  
  <p>What am I doing wrong?  </p>
  
  <p><strong>Edit:</strong> Added missing parm</p>
  
  <p>Ps.</p>
  
  <p>I have the feeling that pattern matching for extracting values from the resultset of a select query to create objects with, is gross overkill. Is there another way in anorm to accomplish this less painfully?</p>