title: Do I have to try-catch JpaRepository
body: <p>I am using JpaRepository from Spring Data JPA framework. I have a snippet of code below:</p>
  
  <pre><code>@Repository
  public interface PresetFolderRepository extends JpaRepository&lt;PresetFolder, Integer&gt;{
  
      @Modifying
      @Transactional
      @Query("update PresetFolder pf set pf.parentId = :parentId where pf.id = :id")
      int updateParentId(@Param("id") int id, @Param("parentId") int parentId);
  }
  </code></pre>
  
  <p>When I invoke this method:</p>
  
  <pre><code>@Autowired PresetFolderRepository repo;
      repo.updateParentId(1,2);
  public void test(){
  </code></pre>
  
  <p>Do I have to surround it with a try-catch? How can I know if the self-defined method 'updateParentId' has try-catch implementation in it?</p>
  
  <p>Thanks!</p>
  
  <p>EDIT:
  My concern is, if my database went down, does this method catch the exception.</p>