Skip to content

Commit

Permalink
Fixed cast int primary key to long / recursive
Browse files Browse the repository at this point in the history
  • Loading branch information
Tapac committed May 23, 2020
1 parent b1b66ed commit c74b14a
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -269,10 +269,7 @@ private fun FieldSet.selectBatched(
}

private fun toLong(autoIncVal: Any): Long = when (autoIncVal) {
is EntityID<*> -> when (val value = autoIncVal.value) {
is Int -> value.toLong()
else -> value as Long
}
is EntityID<*> ->toLong(autoIncVal.value)
is Int -> autoIncVal.toLong()
else -> autoIncVal as Long
}
Expand Down

0 comments on commit c74b14a

Please sign in to comment.