Hi,
It seems the problem still exist with the latest Cuba version. I tried to use composite key following the example mentioned in the start of this thread, I am getting the error:
> Caused by: Exception [EclipseLink-7298] (Eclipse Persistence Services - 2.7.3.6-cuba): org.eclipse.persistence.exceptions.ValidationException
> Exception Description: The mapping [itemId] from the embedded ID class [class example.ItemInventoryCompositeKey] is an invalid mapping for this class. An embeddable class that is used with an embedded ID specification (attribute [itemInventoryCompositeKey] from the source [class example.ItemInventory]) can only contain basic mappings. Either remove the non basic mapping or change the embedded ID specification on the source to be embedded.
> at org.eclipse.persistence.exceptions.ValidationException.invalidMappingForEmbeddedId(ValidationException.java:1312)
> at org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.EmbeddedIdAccessor.addIdFieldsFromAccessors(EmbeddedIdAccessor.java:152)
> at org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.EmbeddedIdAccessor.process(EmbeddedIdAccessor.java:195)
> at org.eclipse.persistence.internal.jpa.metadata.MetadataDescriptor.processMappingAccessors(MetadataDescriptor.java:1525)
> at org.eclipse.persistence.internal.jpa.metadata.accessors.classes.ClassAccessor.processMappingAccessors(ClassAccessor.java:1658)
> at org.eclipse.persistence.internal.jpa.metadata.accessors.classes.EntityAccessor.processMappingAccessors(EntityAccessor.java:1242)
> at org.eclipse.persistence.internal.jpa.metadata.accessors.classes.EntityAccessor.process(EntityAccessor.java:701)
> at org.eclipse.persistence.internal.jpa.metadata.MetadataProject.processStage2(MetadataProject.java:1879)
> at org.eclipse.persistence.internal.jpa.metadata.MetadataProcessor.processORMMetadata(MetadataProcessor.java:580)
> at org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor.processORMetadata(PersistenceUnitProcessor.java:629)
> at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:2001)
> ... 6 more
Any idea how to solve this problem?