title: Are Inheritance & Polymorphic Relations possible / a good idea with Slick?
body: <p>Consider the following simplified domain model i am currently working on:</p>
  
  <pre><code>case class Product(val id : Long, val name : String, product : Option[Product], category : Option[ProductCategory])
  
  case class Price(val id : Long, val amount : Double, val conditions : Seq[Condition])
  
  trait Condition {
    def isTrue(product: Product):Boolean
  }
  case class ManufacturerNameCondition(val id : Long, val name : String){...}
  case class DateCondition(val id : Long, val validFrom : Date, val validTo : Date){...}
  </code></pre>
  
  <p><strong>What does this model represent?</strong></p>
  
  <p>It represents a simple price service, which allows to define multiple prices for a product or product category. The final price for a product is determined by checking all its matching prices and their associated conditions. E.g. there may be a normal price for a Product and one extra price, which is only active today, because it has a DateCondition.</p>
  
  <p><strong>What is my problem?</strong>
  A Price may be associated with multiple Conditions. Each condition may be of another type. So i am asking myself how this should be solved with Slick (=polymorphic relationships). Basically i want to have a DAO-like interface which fetches the prices along with the associated conditions.</p>
  
  <p><strong>My Questions:</strong></p>
  
  <ol>
  <li>Is it possible to implement this model with Slick? (probably yes)</li>
  <li>Polymorphic Relationships: Is it a good idea to solve this problem in Slick? Slick states that it wants to overcome the object relational mismatch and here i have the feeling as if i was trying to fight the framework with this model. Does Slick not play well with such an object-oriented approach? Should i choose another approach?</li>
  </ol>
  
  <p><strong>Plz note:</strong>
  Yes, i have no code to show of what i have tried, but right now i need some direction to look for. Currently i am somehow lost :-)</p>