users@glassfish.java.net

discriminatorcolumn problem

From: Joao Cabral <jcabral_at_orientacao-lda.pt>
Date: Wed, 3 Mar 2010 17:31:14 -0000

Hi,

 

I´m new to JPA and i´m working with a legacy database. I´ve a situation
where I need a compound key whit a discriminator column (the discriminator
column belongs to the key).

 

Al the field of the key (@EmbeddedId) have the correct assessors.

 

However, I´m getting:

 

Exception [EclipseLink-46] (Eclipse Persistence Services -
2.0.0.v20091127-r5931

): org.eclipse.persistence.exceptions.DescriptorException

Exception Description: There should be one non-read-only mapping defined for
the

 primary key field [vcdclmap.mdctab].

Descriptor: RelationalDescriptor(Bd.Venc.Persist.Vcdclmap -->
[DatabaseTable(vcdclmap)])

 

 

regards