micronaut-data
micronaut-data copied to clipboard
RuntimePersistentEntity missing implementation
It's missing RuntimePersistentEntity#getCompositeIdentity implementation and respective usages. When there is a jpa @Entity with multiple @Id using the @IdClass, internal runtime mapping fails.
Do a breakpoint at io.micronaut.data.model.runtime.RuntimePersistentEntity.
Steps to Reproduce
- Run a test with a multiple ID JPA entity and
schema-generate
withcreate
value
Environment Information
- Micronaut Version: 2.0.2
- JDK Version: 11.0.7
- I'm using Kotlin 1.4.10
Example Application
- https://github.com/viniciuslrangel/micronautJpaMultipleKeyIssue ./gradlew test
Stacktrace:
Caused by: io.micronaut.data.exceptions.MappingException: Constructor argument [id2] for type [com.example.jpa.ExampleEntity] must have an associated getter
at io.micronaut.data.model.runtime.RuntimePersistentEntity.<init>(RuntimePersistentEntity.java:104)
at io.micronaut.data.model.PersistentEntity.of(PersistentEntity.java:299)
Any update on this? I'm getting the same error.