Skip to content

Commit 9f3efe6

Browse files
fix naming
1 parent 24f4324 commit 9f3efe6

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

ktorm-ksp-compiler/src/main/kotlin/org/ktorm/ksp/compiler/parser/MetadataParser.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ internal class MetadataParser(resolver: Resolver, environment: SymbolProcessorEn
134134
}
135135

136136
private fun parseColumnMetadata(property: KSPropertyDeclaration, table: TableMetadata): ColumnMetadata {
137+
// @Column annotation is optional.
137138
val column = property.getAnnotationsByType(Column::class).firstOrNull()
138139

139140
var name = column?.name
@@ -195,7 +196,7 @@ internal class MetadataParser(resolver: Resolver, environment: SymbolProcessorEn
195196

196197
if (!hasConstructor) {
197198
val msg = "" +
198-
"Parse sqlType error for property $propName: the sqlType must be a Kotlin singleton object or " +
199+
"Parse sqlType error for property $propName: the sqlType should be a Kotlin singleton object or " +
199200
"a normal class with a constructor that accepts a single org.ktorm.schema.TypeReference argument."
200201
throw IllegalArgumentException(msg)
201202
}

ktorm-ksp-compiler/src/test/kotlin/org/ktorm/ksp/compiler/parser/MetadataParserTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ class MetadataParserTest : BaseKspTest() {
147147
""".trimIndent())
148148

149149
@Test
150-
fun testSqlTypeWithoutConstructor() = kspFailing("Parse sqlType error for property User.ex: the sqlType must be a Kotlin singleton object or a normal class with a constructor that accepts a single org.ktorm.schema.TypeReference argument.", """
150+
fun testSqlTypeWithoutConstructor() = kspFailing("Parse sqlType error for property User.ex: the sqlType should be a Kotlin singleton object or a normal class with a constructor that accepts a single org.ktorm.schema.TypeReference argument.", """
151151
@Table
152152
interface User : Entity<User> {
153153
@PrimaryKey

0 commit comments

Comments
 (0)