is BeanValidationBinder support java records?

If I use BeanValidationBinder.bindInstanceFields with Java records then I get “There are no instance fields found for automatic binding java record” exception.
If I replace record with “java class” then it works fine.
Is there any easy way to use records?
Thank you.

A Java Record is immutable. And therefore not suitable for binding data as this is bi-directional and requires a mutable object

thank you for explanation. Whas is the best practice, please? I fetched projection to “java records” with Jooq. Then want to display them in detail view. Is better to remap record to dto class? Or is also fine to fetch projection to class instead of records (then we can omit remapping - for simplicity)

Depends. DTOs are a more robust solution, as you won’t need to worry about transactions as much, but using them involves more boilerplate code.

Java Records are for read-only data. If you want to change the data you have to use DTOs or if you use jOOQ you can use the jOOQ Record class that is generated from the database table.

I use jOOQ most of the time and there I use the jOOQ records. You can find an example app here: GitHub - 72services/jtaf4: JTAF - Java Track and Field

It’s quite confusing the Records in Java and Records in jOOQ have a different meaning

thank you very much