@Transactional
public Long save(PostsSaveRequestDto requestDto) {
return postsRepository.save(requestDto.toEntity()).getId();
}


딱 보면 알겠는 기능을 하는 service인데

postsRepository.save(requestDto.toEntity()) 이 뒤에 .getId()가 붙는 형태가 이해가 안됨

저장을 하고 그 저장한 객체에서 또 바로 getId를 해서 return해준다는 뜻인거임??

뭔가 직관적으로는 toEntity().getId()) 같은 형태가 되야 할 것같은데