-
May 26th, 2011, 12:09 PM
#11
You'll have to declare the finder in each class to get the automatic generation, else you need to write your own query implementation.
-
May 26th, 2011, 02:18 PM
#12
I basically just need a method in the base class so that I can create a BaseRepository<T> to work with my BaseService<T>. I will make my own implementation, however, it's curious that even when I declared T findByCode(String) in my BaseRepository and then extended that and included MyClass findByCode(String), I got the same message exception.
Perhaps that could be an enhancement for future releases.
-AP_
-
May 30th, 2011, 05:22 PM
#13
Simple answer is: currently we don't support that interface structuring model. We only check the methods declared in the concrete repository interface and assume any method not declared in it and not implemented by the class backing the proxy (SimpleJpaRepository in the JPA case) being a custom method.
The reason we do that is to be able to fail a bit faster as the actual potential custom implementation class is handed in at a later stage (which we would need to discover custom methods more strictly). This is nothing set in stone so I encourage you to simply open an issue in our JIRA as this seems to be a very reasonable feature request.
Thanks for reporting the issue in that detail already!
Ollie
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules