SecureEntitymanager should throw IllegalArgumentException instead of...
Brought to you by:
arnelim
Hello! I'm trying to integrate jpasecurity with Spring Data. Spring Data allows you to define interfaces that automatically create named queries based on the convention of the method name. I am getting a PersistenceException "No named query with name {the query name}" bubbled up from the SecureEntityManager from jpasecurity because Spring is expecting an IllegalArgumentException per the EntityManager#createNamedQuery javadocs.
I believe jpasecurity should honor the specs and I have included what I think is the patch with unit tests to fix the issue. Please let me know if you can publish a release with this patch. Thanks!
I think, Stephan applied the patch and fixed the bug. Thank you, Deryl for reporting and fixing.