Lamberto Basti
01/17/2023, 8:51 AMUser
:
@RestRepository
object Users : Table() {
// ...
val cityId: Column<Int?> = integer("cityId").references(Cities.id).nullable()
override val primaryKey = PrimaryKey(email, name = "PK_email")
}
@RestRepository
object Cities : Table() {
val id = integer("id").autoIncrement() // Column<Int>
val name = varchar("name", 50) // Column<String>
override val primaryKey = PrimaryKey(id, name = "PK_Cities_ID")
}
Is it possible to analyze the initialization of cityId
? I am interested in detecting refenreces(Cities.id)
and in Cities.id
. I am processing @RestRepository
David Rawson
01/17/2023, 9:01 AMephemient
01/17/2023, 9:13 AMval (filePath, lineNumber) = symbol.location as FileLocation
and reading the source yourself, but that is outside the scope of KSPLamberto Basti
01/17/2023, 4:46 PM