DC
Size: a a a
DC
h
ch
DC
DC
GL
GL
A
AE
save
метод JPA?@Transactional
public BankAccount updateRate(Long id, BigDecimal rate) {
BankAccount account = repo.findById(id).orElseThrow(NPE::new);
account.setRate(rate);
return account; // return repo.save(account)
}
@Transactional
@Override
public <S extends T> S save(S entity) {
if (entityInformation.isNew(entity)) {
em.persist(entity);
return entity;
} else {
return em.merge(entity);
}
}
AE
AE
AE
AE
GL
AE
GL
AE
GL
AE