diff --git a/ktorm-ksp-compiler/src/main/kotlin/org/ktorm/ksp/compiler/generator/AddFunctionGenerator.kt b/ktorm-ksp-compiler/src/main/kotlin/org/ktorm/ksp/compiler/generator/AddFunctionGenerator.kt index 00e097ab..443bb2df 100644 --- a/ktorm-ksp-compiler/src/main/kotlin/org/ktorm/ksp/compiler/generator/AddFunctionGenerator.kt +++ b/ktorm-ksp-compiler/src/main/kotlin/org/ktorm/ksp/compiler/generator/AddFunctionGenerator.kt @@ -76,17 +76,16 @@ internal object AddFunctionGenerator { internal fun checkForDml(): CodeBlock { val code = """ - val isModified = - expression.where != null || - expression.groupBy.isNotEmpty() || - expression.having != null || - expression.isDistinct || - expression.orderBy.isNotEmpty() || - expression.offset != null || - expression.limit != null + val isModified = expression.where != null + || expression.groupBy.isNotEmpty() + || expression.having != null + || expression.isDistinct + || expression.orderBy.isNotEmpty() + || expression.offset != null + || expression.limit != null if (isModified) { - val msg = + val msg = "" + "Entity manipulation functions are not supported by this sequence object. " + "Please call on the origin sequence returned from database.sequenceOf(table)" throw UnsupportedOperationException(msg) diff --git a/ktorm-ksp-compiler/src/main/kotlin/org/ktorm/ksp/compiler/generator/RefsClassGenerator.kt b/ktorm-ksp-compiler/src/main/kotlin/org/ktorm/ksp/compiler/generator/RefsClassGenerator.kt index 1395ad3d..ce97545b 100644 --- a/ktorm-ksp-compiler/src/main/kotlin/org/ktorm/ksp/compiler/generator/RefsClassGenerator.kt +++ b/ktorm-ksp-compiler/src/main/kotlin/org/ktorm/ksp/compiler/generator/RefsClassGenerator.kt @@ -21,7 +21,7 @@ internal object RefsClassGenerator { val refTableClass = ClassName(refTable.entityClass.packageName.asString(), refTable.tableClassName) val propertySpec = PropertySpec.builder(column.refTablePropertyName!!, refTableClass) - .addKdoc("Return the referenced table [${refTable.tableClassName}].") + .addKdoc("Return the referenced table of [${table.tableClassName}.${column.columnPropertyName}].") .initializer(CodeBlock.of("t.%N.referenceTable as %T", column.columnPropertyName, refTableClass)) .build()