Easiest Way To Map Optional Nested Case Class with Slick in Scala

Few days ago, I had a scenario, in which I was supposed to map optional nested case class in slick using Scala.

I was trying to do this mapping the way, I have explained below.

But I was getting below compilation error.

After beating my head two days, I found a solution by adding custom mapping.

It worked and now I am able to compile and run my code.

Written by 

Ayush is the Sr. Lead Consultant @ Knoldus Software LLP. In his 10 years of experience he has become a developer with proven experience in architecting and developing web applications. Ayush has a Masters in Computer Application from U.P. Technical University, Ayush is a strong-willed and self-motivated professional who takes deep care in adhering to quality norms within projects. He is capable of managing challenging projects with remarkable deadline sensitivity without compromising code quality.

2 thoughts on “Easiest Way To Map Optional Nested Case Class with Slick in Scala

Leave a Reply

%d bloggers like this: