I'm trying to implement securesocial (authentication plugin for Play2) using slick.
The problem I'm having is that I want to store everything in the same table, but there are a couple of entities that are case classes that should be sub entities of the User. See the problem: https://github.com/leon/securesocial/blob/slick-demo/samples/scala/slick/app/models/User.scala#L63-L96
My question is how should I do the mapping of the columns so that they correctly get converted into their respective case classes where the case classes are nested under another case class?
The same problem goes when converting a single column into a case class https://github.com/leon/securesocial/blob/slick-demo/samples/scala/slick/app/models/User.scala#L61
Where I got it working with MappedTypeMapper.base
but I'm unsure if this is the correct way to go.
https://github.com/leon/securesocial/blob/slick-demo/samples/scala/slick/app/models/User.scala#L61
Any suggestions would be appreciated!