2015-11-09

I'm doing R&D whether we should or should not use Scala 2.11/Play 2.4/Slick 3.1 stack for out new app. I did some Scala programming few years ago and kept it as my favourite language for small personal projects but advanced concepts still are a mystery to me.

After reading this blog post by Matt Handler I want to replicate this behaviour in my PoC app but I run into some problems.

My question is what should I place instead of ??? as commented out pard doesn't work for obvious reason? I know I need to create there a custom Slick shape so it boxes/unboxes contained model val but how should I do it (Slick docs aren't too helpful in this matter)?

I tried to do something like that based on this answer but it gives me compile error as I taken this from earlier Slick version and apparently I don't understand what is going on here.

Hopefully I'm looking for something more automatic (overriden tupled, unapply in BaseModel?) but anything working and any help at all appreciated. Even RTFM if pointed to the right place.

Show more