Uploaded image for project: 'Scala'
  1. Scala
  2. SCALA-307

Support extra fields in document when decoding Case Classes

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.2.0
    • Component/s: None
    • Labels:
      None
    • Sprint:
      JVM Sprint 40

      Description

      I created simple case class:

      case class Seance(_id: ObjectId, deleted: Boolean)
      

      {
      	"_id" : ObjectId("58ff0723867ebf18a863f15e"),
      	"deleted" : true
      }
      

      With this setup everyrhing ok.
      But, if in document add extra field, which doesn't describe in case class, for example:

      {
      	"_id" : ObjectId("58ff0723867ebf18a863f15e"),
      	"deleted" : true,
              "test_field": {
                      "field": 1
               }
      }
      

      I get: java.util.NoSuchElementException: head of empty list

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: