micronaut-data icon indicating copy to clipboard operation
micronaut-data copied to clipboard

RuntimePersistentEntity missing implementation

Open viniciuslrangel opened this issue 4 years ago • 1 comments

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.(RuntimePersistentEntity.java:104)

Steps to Reproduce

  1. Run a test with a multiple ID JPA entity and schema-generate with create 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)

viniciuslrangel avatar Oct 16 '20 02:10 viniciuslrangel

Any update on this? I'm getting the same error.

KDanisme avatar Mar 12 '23 12:03 KDanisme