Given the object `User` : ```@RestRepository objec...
# ksp
l
Given the object
User
:
Copy code
@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
d
e
you could maybe sorta hack it with
val (filePath, lineNumber) = symbol.location as FileLocation
and reading the source yourself, but that is outside the scope of KSP
l
i went for an additiona annotation anyway for other reasons. Thanks anyway 🙂