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

Table of contents
Reading Time: 2 minutes

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 Scala3 min read

Comments are closed.