title: How to update a mongo record using Rogue with MongoCaseClassField when case class contains a scala Enumeration
body: <p>I am upgrading existing code from <code>Rogue 1.1.8</code> to <code>2.0.0</code> and <code>lift-mongodb-record</code> from <code>2.4-M5 to 2.5</code>.</p>
  
  <p>I'm having difficulty writing <code>MongoCaseClassField</code> that contains a scala enum, that I really could use some help with.</p>
  
  <p>For example,</p>
  
  <pre><code>object MyEnum extends Enumeration {
    type MyEnum = Value
    val A = Value(0)
    val B = Value(1)
  }
  
  case class MyCaseClass(name: String, value: MyEnum.MyEnum)
  
  class MyMongo extends MongoRecord[MyMongo] with StringPk[MyMongo] {
    def meta = MyMongo
  
    class MongoCaseClassFieldWithMyEnum[OwnerType &lt;: net.liftweb.record.Record[OwnerType], CaseType](rec : OwnerType)(implicit mf : Manifest[CaseType]) extends MongoCaseClassField[OwnerType, CaseType](rec)(mf) {
      override def formats = super.formats + new EnumSerializer(MyEnum)
    }
  
    object myCaseClass extends MongoCaseClassFieldWithMyEnum[MyMongo, MyCaseClass](this)
    /// ...
  }
  </code></pre>
  
  <p>When we try to write to this field, we get the following error:</p>
  
  <blockquote>
    <p>could not find implicit value for evidence parameter of type
    com.foursquare.rogue.BSONType[MyCaseClass]
           .and(_.myCaseClass  setTo myCaseClass)</p>
  </blockquote>
  
  <p>We used to have this working in Rogue 1.1.8, by using our own version of the <code>MongoCaseClassField</code>, which made the #formats method overridable. But that feature was included into lift-mongodb-record in 2.5-RC6, so we thought this should just work now?</p>