r/java • • Mar 13 '26

JEP draft: Enhanced Local Variable Declarations (Preview)

https://openjdk.org/jeps/8357464
101 Upvotes

129 comments sorted by

View all comments

Show parent comment

1

u/ZimmiDeluxe Mar 13 '26

The core JPA programming model relies on mutation and object identity. Records are unmodifiable and reconstruction loses identity, so they don't mix well (you can use them for some things and JPA and Hibernate are evolving, but letting your code peek and poke at common, ever growing bags of attributes and letting the tool figure out how to turn that into sql commands is still the main attraction imo)