I get the same with 3.0.5, I'm about to go back to 3.0.2 as I don't think I broke since I upgraded recently.
How do you get Hibernate to dump the SQL parameter values as well as the SQL ?
My object is also setup for cascade, but i have walked the object tree and run hsession.save() on each object I encountered to make it assign new object ids to objects going transient -> persistant.
Code:
Hibernate: insert into foobar_data_map (letter_id, name, value) values (?, ?, ?)
WARN 01-07 15:09:38,447 (JDBCExceptionReporter.java:logExceptions:71) -SQL Error: 1210, SQLState: HY000
ERROR 01-07 15:09:38,449 (JDBCExceptionReporter.java:logExceptions:72) -Incorrect arguments to mysql_stmt_execute
ERROR 01-07 15:09:38,452 (AbstractFlushingEventListener.java:performExecutions:277) -Could not synchronize database state with session
org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update
at org.hibernate.exception.ErrorCodeConverter.handledNonSpecificException(ErrorCodeConverter.java:92)
at org.hibernate.exception.ErrorCodeConverter.convert(ErrorCodeConverter.java:80)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:181)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:226)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:140)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:274)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:730)