I'm using Kotlin Exposed for ORM in my Web application. I have an Entity User and it was created in the database(PostgreSQL) I have a problem when I want to find a value in a table(User), show me this Error
Exception in thread "main" org.postgresql.util.PSQLException: ERROR: column users.emailSituation does not exist Hint: Perhaps you meant to reference the column "users.emailsituation". Position: 59
My database is postgresql
User Entity:
object Users : IntIdTable() {
val name = text("name").index()
val family = text("family").index()
val email = text("email").index()
val emailSituation = bool("emailSituation")
val mobile = long("mobile").index()
}
class User(id: EntityID<Int>) : IntEntity(id) {
companion object : IntEntityClass<User>(Users)
var name by Users.name
var family by Users.family
var email by Users.email
var emailSituation by Users.emailSituation
var mobile by Users.mobile
}
find a value :
transaction {
logger.addLogger(StdOutSqlLogger)
println("User: ${User.find { Users.mobile eq 87654 }.joinToString {it.name}}")
}
How can I solve it?