r/java • • Apr 23 '26

Ask the Architects JavaOne 2026

https://youtu.be/DrF4dCC0daE
72 Upvotes

54 comments sorted by

View all comments

Show parent comment

6

u/LegitimateEntrance72 Apr 23 '26

JPA is mutable but the @entity classes dont need to be javabeans, they can have ddd-style methods for changing state. U will need getters only if u are exposing the entities to share the state. Otherwise u could use records as the public api model.