micronaut-projects / micronaut-projects/micronaut-data
GraalVM Native image metadata for JPA Metamodel implementation
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 482
- Forks
- 229
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 32
Description
Issue description
io.micronaut.data.runtime.criteria.metamodel.StaticMetamodelInitializer class is using reflection to set values for metamodel attributes, for example
ReflectionUtils.setField(field, field.getDeclaringClass(), new RuntimePersistentPropertySingularAttribute<>(persistentEntity, prop));
which fails when executed in a native image.
Can native image metadata be automatically created when JPA Metamodel implementation is used?
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 with io.micronaut.data.runtime.criteria.metamodel.StaticMetamodelInitializer and the ReflectionUtils.setField call shown in the issue. Trace how native-image metadata is configured for this JPA Metamodel implementation; done means the reflective attribute initialization works when running as a native image.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend, databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100