diff --git a/exposed-dao/src/main/kotlin/org/jetbrains/exposed/dao/InnerTableLink.kt b/exposed-dao/src/main/kotlin/org/jetbrains/exposed/dao/InnerTableLink.kt index 2d81bd470d..76aa8a4d93 100644 --- a/exposed-dao/src/main/kotlin/org/jetbrains/exposed/dao/InnerTableLink.kt +++ b/exposed-dao/src/main/kotlin/org/jetbrains/exposed/dao/InnerTableLink.kt @@ -78,8 +78,7 @@ class InnerTableLink, Source : Entity, ID : Comparabl columns to entityTables } - private val additionalColumns = (additionalColumns - ?: (table.columns - sourceColumn - targetColumn).filter { !it.columnType.isAutoInc }) + private val additionalColumns = (additionalColumns ?: (table.columns - sourceColumn - targetColumn).filter { !it.columnType.isAutoInc }) .takeIf { it.isEmpty() || target is InnerTableLinkEntityClass } ?: error("Target entity must extend InnerTableLinkEntity to properly store and cache additional column data")