micronaut-projects / micronaut-projects/micronaut-data
JDBC repositories should not require an entity
Open
Nobody has claimed this yet.
type: bug
- Dominant language
- Java
- Stars
- 482
- Forks
- 229
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 32
Description
Expected Behavior
@JdbcRepository(dialect = Dialect.ORACLE)
public interface OracleUtilityQueries {
@Query("SELECT userenv('sessionid') FROM dual")
long getAUDSID();
}
This should work.
Actual Behaviour
error: Unable to implement Repository method: OracleUtilityQueries.getAUDSID(). Could not resolved root entity. Either implement the Repository interface or define the entity as part of the signature
Steps To Reproduce
No response
Environment Information
No response
Example Application
No response
Version
4.8
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how @JdbcRepository handles a repository method without an entity, using the OracleUtilityQueries example and its getAUDSID() query as the entry point. Confirm that the example compiles without the root-entity error and that entity-based repository methods continue to work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, sql
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100