custom apply in table definition

5 views
Skip to first unread message

Edgars

unread,
May 30, 2016, 4:30:35 AM5/30/16
to Slick / ScalaQuery
Hi,

is it possible to create custom apply method to duplicate column?

Instead of:
def * = (id.?, col1, col2, col3) <> (Caseclass.tupled, Caseclass.unapply)

Something like:

def * = (id.?, col1, col2, col3) <> (Caseclass.apply(id,col2,col2,col3).tupled, Caseclass.unapply)

but when I try to define such custom mapping, I get:

type mismatch;
 found  
: slick.lifted.Rep[String]
 required
: String



Reply all
Reply to author
Forward
0 new messages