Daniel Stroh (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=63e36f3...
) *created* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiN2ViYjMxNzE1...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-16151?atlOrigin=eyJpIjoiN2ViYj...
) HHH-16151 (
https://hibernate.atlassian.net/browse/HHH-16151?atlOrigin=eyJpIjoiN2ViYj...
) NPE SqmTreePrinter.visitLikePredicate getEscapeCharacter is null (
https://hibernate.atlassian.net/browse/HHH-16151?atlOrigin=eyJpIjoiN2ViYj...
)
Issue Type: Bug Affects Versions: 6.1.6 Assignee: Unassigned Components: query-hql
Created: 08/Feb/2023 02:09 AM Environment: 6.1.5 Hibernate, Java 10, macOS Venture 13.1,
Postgres 14.6 Priority: Minor Reporter: Daniel Stroh (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=63e36f3...
)
@Entity
public class Test {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = "id" , nullable = false )
private Long id;
private String x;
public Long getId() {
return id;
}
public void setId( Long id) {
this.id = id;
}
public String getX() {
return x;
}
public void setX( String x) {
this.x = x;
}
}
@Repository
public interface TestRepository extends CrudRepository<Test, Long >
{
@Transactional
@Modifying
@Query(value = "UPDATE Test t SET t.x = :value1 "
+ "WHERE t.x LIKE :value2" )
void update( String value1, String value2);
}
during startup with logging.level.org.hibernate: TRACE logging
SqmTreePrinter.visitLikePredicate results in an NPE because predicate.getEscapeCharacter()
is null. I am not sure what the escape character should look like of a predicate, but
can’t we just check if the escape character is not null? low priority because it is just a
logging issue
(
https://hibernate.atlassian.net/browse/HHH-16151#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16151#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#100214- sha1:6795dbd )