Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the ignoreGeneratedKeys option to improve performance #861

Merged
merged 3 commits into from
Jul 17, 2022

Conversation

nakamura-to
Copy link
Member

We can write a DAO class as follows:

@Dao
public interface EmployeeDao {

  @BatchInsert(ignoreGeneratedKeys = true)
  int[] insert(List<Employee> entities);
}

Note that if this option is enabled, Doma will not retrieve auto-generated keys from the database to the application.

@nakamura-to nakamura-to merged commit 9346852 into master Jul 17, 2022
@nakamura-to nakamura-to deleted the feat/ignore-generated-keys branch July 17, 2022 05:04
@nakamura-to nakamura-to changed the title Add the ignoreGeneratedKeys options to improve performance Add the ignoreGeneratedKeys option to improve performance Jul 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant