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

Fix an issue where calling peek on NativeSql caused a ClassCastException #1180

Merged
merged 3 commits into from
Sep 6, 2024

Conversation

nakamura-to
Copy link
Member

@nakamura-to nakamura-to commented Sep 6, 2024

The ClassCastException occurred when executing peek after calling onDuplicateKeyUpdate or onDuplicateKeyIgnore. For example, the ClassCastException occurred in the following code:

var nativeSql = new NativeSql(config);
var d = new Department_();

nativeSql
    .insert(d)
    .values(
        c -> {
            c.value(d.departmentId, 1);
            c.value(d.departmentNo, 60);
            c.value(d.departmentName, "DEVELOPMENT");
            c.value(d.location, "KYOTO");
            c.value(d.version, 2);
        })
    .onDuplicateKeyUpdate()
    .peek(System.out::println)
    .execute();

@github-actions github-actions bot added the fix label Sep 6, 2024
@nakamura-to nakamura-to merged commit 75811e7 into master Sep 6, 2024
10 checks passed
@nakamura-to nakamura-to deleted the fix/native-sql-insert branch September 6, 2024 22:16
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