chimney
chimney copied to clipboard
Nested patchers don't work with subset of fields
It's ok to patch a subset of fields on the top level, but not on deeper levels.
import io.scalaland.chimney.dsl._
case class Foo(x: Int, y: String)
case class FooPatch(x: Int)
case class Bar(foo: Foo, z: Long)
case class BarPatch(foo: FooPatch)
val foo = Foo(1, "2")
val bar = Bar(foo, 3)
val fooPatch = FooPatch(4)
val barPatch = BarPatch(fooPatch)
foo.patchWith(fooPatch) // ok
bar.patchWith(barPatch) // y: java.lang.String - no accessor named y in source type FooPatch
Awesome library btw :+1: