title: Scala projections in Slick for only one column
body: <p>I'm following the <a href="http://slick.typesafe.com/doc/1.0.1/lifted-embedding.html" rel="nofollow noreferrer">Slick documentation example for autoincrementing fields</a> and I'm having trouble creating a <a href="https://stackoverflow.com/questions/13906684/scala-slick-method-i-can-not-understand-so-far">mapped projection</a> that ... well, only has one column.</p>
  
  <pre><code>case class UserRole(id: Option[Int], role: String)
  
  object UserRoles extends Table[UserRole]("userRole") {
    def id = column[Int]("ID", O.PrimaryKey, O.AutoInc)
    def role = column[String]("ROLE")
    // ...
    def * = id.? ~ role &lt;&gt; (UserRole, UserRole.unapply _)
        // NEXT LINE ERRORS OUT
    def forInsert = role &lt;&gt; ({t =&gt; UserRole(None, t._1)}, {(r: UserRole) =&gt; Some((r.role))}) returning id   
  }
  </code></pre>
  
  <p>The error is "value &lt;> is not a member of scala.slick.lifted.Column[String]"</p>
  
  <p>I also thought it'd be more efficient to design my schema like so:</p>
  
  <pre><code>case class UserRole(role: String)
  
  object UserRoles extends Table[UserRole]("userRole") {
    def role = column[Int]("ROLE", O.PrimaryKey)
    // ...
    def * = role &lt;&gt; (UserRole, UserRole.unapply _)
  
  }
  </code></pre>
  
  <p>But then I start getting the same error as above, too. "value &lt;> is not a member of scala.slick.lifted.Column[String]"</p>
  
  <p>What am I really doing? Do I just not have a <a href="http://en.wikipedia.org/wiki/Projection_%28relational_algebra%29" rel="nofollow noreferrer">projection</a> anymore because I only have one column? If so, what <em>should</em> I be doing?</p>