Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

HHH-19750 Reproducer for org.hibernate.sql.exec.ExecutionException in CriteriaUpdate with specific attribute/parameter configuration #10863

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

Closed
yrodiere wants to merge 1 commit into hibernate:main from yrodiere:HHH-19750
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
*/
package org.hibernate.orm.test.jpa.query;

import jakarta.persistence.GeneratedValue;
import jakarta.persistence.Lob;
import org.hibernate.testing.orm.junit.EntityManagerFactoryScope;
import org.hibernate.testing.orm.junit.Jpa;
import org.junit.jupiter.api.Test;
Expand All @@ -17,8 +19,12 @@
import jakarta.persistence.criteria.Root;
import jakarta.persistence.metamodel.EntityType;


@Jpa(
annotatedClasses = CriteriaUpdateWithParametersTest.Person.class
annotatedClasses = {
CriteriaUpdateWithParametersTest.Person.class,
CriteriaUpdateWithParametersTest.Process.class
}
)
public class CriteriaUpdateWithParametersTest {

Expand Down Expand Up @@ -76,6 +82,19 @@ public void testCriteriaUpdate2(EntityManagerFactoryScope scope) {
);
}

@Test
public void testCriteriaUpdate3(EntityManagerFactoryScope scope) {
scope.inTransaction( em -> {
CriteriaBuilder criteriaBuilder = em.getCriteriaBuilder();
CriteriaUpdate<Process> createCriteriaUpdate = criteriaBuilder.createCriteriaUpdate(
Process.class );
Root<Process> root = createCriteriaUpdate.from( Process.class );
createCriteriaUpdate.set( root.get( "name" ), (Object) null );
createCriteriaUpdate.set( root.get( "payload" ), (Object) null );
em.createQuery( createCriteriaUpdate ).executeUpdate();
} );
}

@Entity(name = "Person")
public static class Person {

Expand All @@ -101,4 +120,20 @@ public Integer getAge() {
return age;
}
}

@Entity
public static class Process {

@Id
@GeneratedValue
private Long id;

// All attributes below are necessary to reproduce the issue

private String name;

@Lob
private byte[] payload;

}
}
Loading

AltStyle によって変換されたページ (->オリジナル) /