Skip to content

Instantly share code, notes, and snippets.

@jerolba
Last active August 21, 2018 21:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jerolba/4d491249bfff393de22b39f96b8b87c7 to your computer and use it in GitHub Desktop.
Save jerolba/4d491249bfff393de22b39f96b8b87c7 to your computer and use it in GitHub Desktop.
In batches of 1000 records
EntityManagerFactoryFactory factory = new EntityManagerFactoryFactory(dsFactory, TripEntity.class) {
@Override
public Properties properties() {
Properties properties = super.properties();
properties.put("hibernate.jdbc.batch_size", batchSize);
return properties;
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment