Sometimes, in a Data JPA environment, when three queries occur in one method, one query does not work normally in DB
You can enable SQL logging and check what data is actually passed to the database.
One of the reason can be: @Transactional annotation doesn't work. You need to get a service from the Spring Context to allow Spring to wrap method1() with a proxy method to do dirty checking and save data.
@Transactional annotation is a bit messy. It is primary not about transactions, but about dirty checking and Hibernate session control.
When you do
logRepository.save(new Log(point));

data is saved because logRepository.save() has it is own @Transactional annotation and does explicit call to save the data.
log.minusPoint(point) could work, if @Transactional works correctly. A Spring proxy could open Hibernate session (Persistent Context) before method1() call and close it in the end. During closing session Hibernate does dirty checking — checks, if any of objects in session were changed and saves such objects.
Another reason can be that you load log in a method without @Transactional or in a method with own @Transactional. Different @Transactional means different Persistent Context.
One exception — when @Transactional of method1() is wrapped with another @Transactional that is used for a method that calls method1().
It is bad practice to solve all issues with putting @Transactional everywhere. You can just do
logRepository.save(log)


Sometimes, in a Data JPA environment, when three queries occur in one method, one query does not work normally in DB.
@Transactional
public void method1(Log log){
        Long userId = log.getUserId();
        User user = userRepository.findById(userId).orElseThrow(RuntimeException::new)

        BigDecimal point = BigDecimal.valueOf(100L);
        user.minusPoint(point);
        log.minusPoint(point);
        logRepository.save(new Log(point));
}

It works normally for one case.
However, I ran it on several occasions, and one did not work properly.
ex) logList.forEach(log-> a.method1(log));
did not work "log.minusPoint(point);" in all cases.
The data in the DB has not changed about log.
But the new log data was inserted and the user data has been changed.
It was confirmed that the update, insert query was created successfully in the test environment.
