Uploaded image for project: 'Spring Data JPA'
  1. Spring Data JPA
  2. DATAJPA-118

Add option so that CrudRepository.findOne throws an unchecked exception if entity is not found

    XMLWordPrintable

Details

    • New Feature
    • Status: Closed
    • Minor
    • Resolution: Won't Do
    • None
    • None
    • None
    • None

    Description

      For a clean design it would be great if I could set an option (maybe on the jpa:repository tag) that will throw a javax.persistence.EntityNotFoundException (or some other unchecked exception) instead of returning null if CrudRepository.findOne does not find the entity.

      Attachments

        Issue Links

          Activity

            People

              olivergierke Oliver Drotbohm
              nitegate Adrian
              Spring Issues Spring Issues
              Votes:
              14 Vote for this issue
              Watchers:
              26 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: