kclay / rethink-scala

Scala Driver for RethinkDB
Other
100 stars 24 forks source link

Inserting case classes with optional subclass attributes inserts null #22

Closed mick-h closed 9 years ago

mick-h commented 9 years ago
case class SubTest (id: String, value: Option[String]) extends com.rethinkscala.Document
case class Test2 (id: String, value: Option[SubTest]) extends com.rethinkscala.Document
val st = SubTest("2", Some("subvalue"))
val t2 = Test2("3", Some(st))
val q = r.db("notifications").table[Test2]("test").insert(t2).run

inserts:

{
    "id":  "3" ,
    "value": null
}

into the db.

kclay commented 9 years ago

New snapshot for this as well.

mick-h commented 9 years ago

Thanks Keyston,  I’ll let you know.

On 27 November 2014 at 4:37:05 am, Keyston (notifications@github.com) wrote:

New snapshot for this as well.

— Reply to this email directly or view it on GitHub.