Hi
A similar question has already been asked, but I have a slightly different case where the embedded type is used not only in a collection but also as a separate field in the same or in other entity.
@Entity
class Test {
@Embedded
private Doc doc;
@JdbcTypeCode(SqlTypes.JSON)
private List<Doc> docs;
...
}
@Embeddable
class Doc {
private String archiveNumber;
private String archiveStatus;
private ZonedDateTime archivedAt;
private String details;
...
}
I am getting error:
org.hibernate.AnnotationException: Property '...Test.docs' is mapped as basic aggregate component array, but this is not yet supported.
regards,
Valdas
p.s. this is exception trace of my real app:
Expecting code not to raise a throwable but caught
"org.hibernate.AnnotationException: Property 'lt.gama.model.sql.documents.EstimateSql.docs' is mapped as basic aggregate component array, but this is not yet supported.
at org.hibernate.boot.model.internal.PropertyBinder.bindBasic(PropertyBinder.java:1068)
at org.hibernate.boot.model.internal.PropertyBinder.bindProperty(PropertyBinder.java:890)
at org.hibernate.boot.model.internal.PropertyBinder.buildProperty(PropertyBinder.java:788)
at org.hibernate.boot.model.internal.PropertyBinder.processElementAnnotations(PropertyBinder.java:709)
at org.hibernate.boot.model.internal.EntityBinder.processIdPropertiesIfNotAlready(EntityBinder.java:1041)
at org.hibernate.boot.model.internal.EntityBinder.handleIdentifier(EntityBinder.java:357)
at org.hibernate.boot.model.internal.EntityBinder.bindEntityClass(EntityBinder.java:237)
at org.hibernate.boot.model.internal.AnnotationBinder.bindClass(AnnotationBinder.java:423)
at org.hibernate.boot.model.source.internal.annotations.AnnotationMetadataSourceProcessorImpl.processEntityHierarchies(AnnotationMetadataSourceProcessorImpl.java:256)
at org.hibernate.boot.model.process.spi.MetadataBuildingProcess$1.processEntityHierarchies(MetadataBuildingProcess.java:279)
at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:322)
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:1432)
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1503)
at org.hibernate.jpa.HibernatePersistenceProvider.createEntityManagerFactory(HibernatePersistenceProvider.java:55)
at jakarta.persistence.Persistence.createEntityManagerFactory(Persistence.java:80)
at lt.gama.test.base.guice.TestJpaPersistService.start(TestJpaPersistService.java:92)