Felix König (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=5a4bad5...
) *commented* on HHH-16249 (
https://hibernate.atlassian.net/browse/HHH-16249?atlOrigin=eyJpIjoiZTViMz...
)
Re: StatelessSession does not flush when using jdbc batch_size > 1 (
https://hibernate.atlassian.net/browse/HHH-16249?atlOrigin=eyJpIjoiZTViMz...
)
Hey there,
For [the last round of statements to not get flushed] to happen, the
inserts need to be inside in a transaction opened by the stateless session
I am not sure why this is a requirement. In fact, using the stateless session the
“conventional way”, meaning purely within a transaction managed by the stateless session,
works fine for all jdbc batch sizes:
statelessSession.getTransaction().begin();
// do stuff
statelessSession.getTransaction().commit();
But in the example I provided, the batch size is 2, and the third entity is lost (the test
fails).
(
https://hibernate.atlassian.net/browse/HHH-16249#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16249#add-comment?atlOrigin=ey...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100217- sha1:45db922 )