Allow data services to extend existing interfaces
- Dominant language
- Groovy
- Stars
- 2.9k
- Forks
- 975
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 92
Description
### Steps to Reproduce
1. Create a domain class
2. Create a generic interface which methods match dynamic finders (or are compatible with data services in any other ways, e.g. queries)
3. Create a data service which will extend the generic interface
### Expected Behaviour
The data service compiles and uses the bound generic type into an account
### Actual Behaviour
The data service fails to compile
```
development/sandbox/data-services-with-generics/src/main/groovy/com/example/generic/StuffService.groovy: 8: No implementations possible for method 'java.util.List findAllByName(java.lang.String)'. Please use an abstract class instead and provide an implementation.
@ line 8, column 5.
interface StuffService extends CrudService {
^
1 error
```
### Environment Information
- **Operating System**: Darwin
- **GORM Version:** 6.1.10.RELEASE
- **Grails Version (if using Grails):** 3.3.8
- **JDK Version:** Java(TM) SE Runtime Environment (build 1.8.0_92-b14)
### Example Application
https://github.com/musketyr/data-services-with-generics
Contributor guide
Research direction
Start with the linked example application and its failing data-services-with-generics/src/main/groovy/com/example/generic/StuffService.groovy entry point. Reproduce the compilation failure with the stated Grails, GORM, and JDK versions, then trace how CrudService and dynamic finder methods are handled. Done means a data service extending the generic interface compiles and uses the bound domain type.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- groovy
- Domain
- backend-api-design
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100