https://kotlinlang.org logo
c

Cyrille QUÉMIN

10/28/2020, 7:23 AM
Hi there, I have a transaction in which I do few inserts. I get a
org.jetbrains.exposed.exceptions.ExposedSQLException: java.sql.BatchUpdateException: Duplicate entry
but I am unable to catch it with a
try/catch
from within the transaction. Anyone knows how to manage exceptions in Exposed from within a transaction? I'd like to do something specific (which, ideally, would not be to simply ignore the exception) when this exception is raised. If not, is there a way to do the equivalent of
Table.insertOrIgonre
but on an
EntityClass
? Currently I am seeing on
EntityClass.new
1