Hi! I am trying to insert sample data into my mysq...
# exposed
t
Hi! I am trying to insert sample data into my mysql database. I am using the following code:
Copy code
SomeTable.batchInsert((0 until 1_000).toList()) { number ->
    this[SomeTable.type] = "some-type"
    this[SomeTable.data] = """{"foo":"$number"}"""
}
but for some reason exposed creates 1000 statements for this instead of one batch statement. Is this the intended behaviour, or am i missing something?
t
Please look for
rewriteBatchedStatements
at jdbc driver documentation here https://dev.mysql.com/doc/connector-j/5.1/en/connector-j-reference-configuration-properties.html