Solved problem with recursive case classes such as :
    case class A(b: B)
    case class B(a: A)