BatchedTooManyRowsAffectedException raised when save entity with @ElementCollection
Description
Attachments
1
Activity
Show:

Brett Meyer April 21, 2014 at 12:31 PM
Thanks for the response!

Yanming Zhou (quaff@github) April 21, 2014 at 2:13 AM
see http://bugs.mysql.com/bug.php?id=61213
please close and

Yanming Zhou (quaff@github) April 21, 2014 at 2:01 AM
It's a bug of mysql jdbc driver,It occurs where using jdbc url with param rewriteBatchedStatements=true

Yanming Zhou (quaff@github) April 21, 2014 at 1:24 AM
I found statement.executeBatch() in org.hibernate.engine.jdbc.batch.internal.BatchingBatch line 123
returns [3,3,3], but it should be [1,1,1],maybe it's mysql jdbc driver or bonecp connection pool bug

Yanming Zhou (quaff@github) April 19, 2014 at 2:04 AM
may be associated
Article.java and Section.java are zipped in attachment.
it will pass through if only add one section,more sections will failed.
I guess hibernate doesn't use collection's size as expectedRowCount if the collection is not hibernate's implementation such as PersistentList , the expectedRowCount remains with last execution, here is saving master entity article.