You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If an already existing entry is inserted with insertIgnore() I get the error:
java.lang.IllegalStateException: users.id is not in record set
at org.jetbrains.exposed.sql.ResultRow.getRaw(Query.kt:59)
at org.jetbrains.exposed.sql.ResultRow.get(Query.kt:24)
at org.jetbrains.exposed.sql.statements.InsertStatement.get(InsertStatement.kt:24)
at timebox.users.UsersTableKt.insertUserIgnore(UsersTable.kt:149)
at timebox.users.UsersTableTest$test insert ignore user from existing user$1.invoke(UsersTableTest.kt:74)
at timebox.users.UsersTableTest$test insert ignore user from existing user$1.invoke(UsersTableTest.kt:9)
at timebox.test.MysqlTestTrait$transaction$1.invoke(MysqlTestTrait.kt:74)
at timebox.test.MysqlTestTrait$transaction$1.invoke(MysqlTestTrait.kt:28)
at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.inTopLevelTransaction(ThreadLocalTransactionManager.kt:104)
at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.transaction(ThreadLocalTransactionManager.kt:75)
at timebox.test.MysqlTestTrait$DefaultImpls.transaction(MysqlTestTrait.kt:73)
at timebox.users.UsersTableTest.transaction(UsersTableTest.kt:9)
at timebox.users.UsersTableTest.test insert ignore user from existing user(UsersTableTest.kt:73)
The table definition is:
object Users : Table() {
val id = intId()
val initial = varchar("initial", INITIAL_LENGTH).uniqueIndex()
val firstName = varchar("firstName", FIRST_NAME_LENGTH)
val lastName = varchar("lastName", LAST_NAME_LENGTH)
val serviceProvider = varchar("serviceProvider", SERVICE_PROVIDER_LENGTH)
val adRef = varchar("adRef", AD_REF_LENGTH).uniqueIndex()
val archived = bool("archived")
}
fun Table.intId(name: String = "ID") = this.integer(name).primaryKey().autoIncrement()
@Tapac
I have a similar issue in an older version (0.17.3)
Stacktrace: java.lang.IllegalStateException: kotlin.Unit is not in record set at org.jetbrains.exposed.sql.ResultRow.getRaw(Query.kt:59) at org.jetbrains.exposed.sql.ResultRow.get(Query.kt:24) at org.jetbrains.exposed.sql.statements.InsertStatement.get(InsertStatement.kt:21)
The statement: MonthsSubmitted .insertIgnore { it[month] = month // ... } get MonthsSubmitted.id
This happens when two parallel transactions try to insert the same data into the MonthsSubmitted-table.
If an already existing entry is inserted with insertIgnore() I get the error:
The table definition is:
The insertIgnore() is:
The jdbc driver is mysql-connector-java:8.0.12.
The text was updated successfully, but these errors were encountered: