Envers does not support records?!

I use records as Embeddables in my entities. All worked well till I introduced envers. Now, when trying to load a revision, I always get a error, that hibernate is missing a no-args constructor. n

I reproduced this error with the hibernate envers tutorial example code from Getting Started with Hibernate. I just added a property

@Embedded
private TheRecord theRecord;

with

@Embeddable
public record TheRecord(String name) {
}

to the entity. Saving and reading the entity works quite well, but calling

Event firstRevision = reader.find( Event.class, 2L, 1 );

leads to

org.hibernate.envers.exception.AuditException: org.hibernate.PropertyNotFoundException: Object class [org.hibernate.tutorial.envers.TheRecord] must declare a default (no-argument) constructor

Is this a known issue? Are there plans to support records with envers? Does anyone knows a workaround not turning all my records into POJOs.

I’ve looked through our issue tracker and found no report for this. Hibernate envers has been receiving little support lately, and while ORM stayed up to date with the Java language and supports records natively some of its modules might not yet handle them correctly. Please open a new bug report and include a reproducer test case so that we might look into the problem.

I’m afraind that’s going to be the only workaround for the time being.

thx mbladel for your support. As you suggested, I opened a bug report for this: [HHH-18691] - Hibernate JIRA.

ChatGPT suggested to write an Instantiator for my record and configure Envers to use this, but I didn’t manage to make this even compile …