Sergio Pro
05/25/2024, 10:18 AMsave()
to persist an update of a changed Entity object and simply update the fields. But in kotlin I'd need to use `var`s for that, which seems meh... So how do you do it? Because AFAIK calling save
to persist updates is considered a bad practice and forces unnecessary flushes.Riccardo Lippolis
05/25/2024, 1:11 PMsave
method in JPA repositories, I recommend this article: https://vladmihalcea.com/best-spring-data-jparepository/Sergio Pro
05/25/2024, 1:16 PMRaimund Klein
05/25/2024, 1:37 PMimmutables
library don't lend themselves well to entity classes either. They're contradicting concepts. If you want to use JPA, like @Riccardo Lippolis says, accept mutability and limit it to the persistence layer/module.Sergio Pro
05/25/2024, 1:38 PMSergio Pro
05/25/2024, 1:38 PMJacob
05/26/2024, 6:15 PMasm0dey
06/03/2024, 8:52 AM