You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 20, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+54Lines changed: 54 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -355,6 +355,60 @@ data class Dst(
355
355
)
356
356
```
357
357
358
+
#### Deserialization from multiple arguments
359
+
If `InnerDst` requires multiple arguments, you can not map `Dst` with `KRwoMapper` as it is.
360
+
You can deserialize such a class which requires multiple arguments by using the `KParameterFlatten` annotation.
361
+
362
+
```kotlin
363
+
data classInnerDst(valfooFoo:Int, valbarBar:String)
364
+
data classDst(valbazBaz:InnerDst, valquxQux:LocalDateTime)
365
+
```
366
+
367
+
If the column name of `DB` is `snake_case` and you want to specify the argument name as a prefix, the following annotation is added.
368
+
The class specified with `KParameterFlatten` is initialized from the function specified with the aforementioned `KConstructor` annotation or the `primary constructor`.
369
+
370
+
```kotlin
371
+
data classInnerDst(valfooFoo:Int, valbarBar:String)
0 commit comments