Given a simple JPA arrangement like this:

@Embeddable
record MyId(UUID id) {}

@Entity
class MyEntity {
  @EmbeddedId MyId id;
}

a GraalVM execution of a current Spring Boot 3.3.4 application will log the following output:

… : HHH000038: Composite-id class does not override equals(): ….MyId
… : HHH000039: Composite-id class does not override hashCode(): ….MyId

That is because Hibernate verifies the identifier types for the presence of equals(…)/hashCode(). Apparently, our JPA entity processing does not yet expose these modules. I had originally reported the issue to Hibernate, assuming it was a bug in it. I ended up suggesting that they should avoid the reflective lookups for records in the first place, as the methods are present by definition. Depending on the outcome of that discussion, I wonder if it's worth exposing the additional methods on our side.

The symptoms can be observed in the Spring RESTBucks sample project by executing the following steps:

$ git clone https://github.com/odrotbohm/spring-restbucks
$ cd spring-restbucks/server
$ ./mvnw -Pbuildpacks-native
$ docker run -p 8080:8080 docker.io/library/restbucks:1.0.0-SNAPSHOT

Comment From: odrotbohm

It looks like the Hibernate team is willing to move. I've created a new ticket to avoid the reflective lookup in the first place.

Comment From: sdeleuze

Great, should we close this issue as won't fix then given the fact Hibernate 7 will fix that and current version only print warnings?

Comment From: odrotbohm

Yeah, sure. I am still hoping for a backport into the 6 generation, but I agree that the warning log might just be annoying but is of no real harm.