title: How to use a case classes when hierarchy is needed?
body: <p>I know that you're not allowed to inherit from case classes but how would you do when you really need to? We have two classes in a hierarchy, both contain many fields, and we need to be able to create instances of both. Here's my options:</p>
  
  <ul>
  <li>If I'd make the super class a usual class instead of a case class - I'd lose all the case class goodness such as toString, equals, hashCode methods etc. </li>
  <li>If I keep it as a case class, I'd break the rule of not inheriting from case classes.</li>
  <li>If I use composition in the child class - I'd have to write lots of methods and redirect them to the other class - which would mean lots of work and would feel non-Scalaish.</li>
  </ul>
  
  <p>What should I do? Isn't it quite a common problem?</p>