This repository was archived by the owner on Jan 20, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
src/main/kotlin/com/mapk/krowmapper Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -23,10 +23,10 @@ class KRowMapper<T : Any> private constructor(
23
23
val argumentBucket = function.getArgumentBucket()
24
24
25
25
parameters.forEach { param ->
26
- argumentBucket.setArgument( when {
26
+ argumentBucket.putIfAbsent(param.param, when {
27
27
param.clazz.isEnum -> EnumMapper .getEnum(param.clazz, rs.getObject(param.name, stringClazz))
28
28
else -> rs.getObject(param.name, param.clazz)
29
- }, param.index )
29
+ })
30
30
}
31
31
32
32
return function.call(argumentBucket)
Original file line number Diff line number Diff line change @@ -5,9 +5,10 @@ import com.mapk.annotations.KParameterAlias
5
5
import kotlin.reflect.KClass
6
6
import kotlin.reflect.KParameter
7
7
8
+ @Suppress(" ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE" )
8
9
class ParameterForMap <D : Any > private constructor(
9
10
val name : String ,
10
- val index : Int ,
11
+ val param : KParameter ,
11
12
val clazz : Class <D >
12
13
) {
13
14
companion object {
@@ -23,7 +24,7 @@ class ParameterForMap<D : Any> private constructor(
23
24
24
25
return ParameterForMap (
25
26
alias ? : propertyNameConverter(param.name!! ),
26
- param.index ,
27
+ param,
27
28
(param.type.classifier as KClass <* >).java
28
29
)
29
30
}
You can’t perform that action at this time.
0 commit comments