you are right with this error.
after removing the typo, we gain a new exception (two different ones)
1) when using the *Impl in the mapping:
<one-to-many name="donatedLiterature"
target-entity="lumo.core.biooffice.impl.LiteratureImpl"
mapped-by="originContact">
Exception [EclipseLink-127] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.DescriptorException
Exception Description: The get method for the attribute [donatedLiterature] does not return a ValueHolderInterface, but the mapping uses indirection.
Mapping: org.eclipse.persistence.mappings.OneToManyMapping[donatedLiterature]
Descriptor: RelationalDescriptor(lumo.core.biooffice.impl.ContactImpl --> [DatabaseTable(tContacts)])
Exception [EclipseLink-129] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.DescriptorException
Exception Description: The set method for the attribute [donatedLiterature] does not take a ValueHolderInterface as its parameter, but the mapping uses indirection.
Mapping: org.eclipse.persistence.mappings.OneToManyMapping[donatedLiterature]
Descriptor: RelationalDescriptor(lumo.core.biooffice.impl.ContactImpl --> [DatabaseTable(tContacts)])
if i understand this right, it moans about mapping an impl whereat the interface/impl only uses an interface.
there we go -> i change the mapping to the interface...
2) two ways?
a)
<one-to-many name="donatedLiterature"
target-entity="lumo.core.biooffice.Literature"
mapped-by="originContact">
Exception Description: [class lumo.core.biooffice.impl.LiteratureImpl] uses a non-entity [class lumo.core.biooffice.Contact] as target entity in the relationship attribute [method getOriginContact].
b)
<one-to-many name="donatedLiterature"
target-entity="Literature"
mapped-by="originContact">
Exception Description: [class lumo.core.biooffice.impl.LiteratureImpl] uses a non-entity [class Contact] as target entity in the relationship attribute [method getOriginContact].
i expected the last one wo be correct as the mapping is defined:
<entity class="lumo.core.biooffice.impl.ContactImpl" name="Contact">
any hints/solutions to this are welcome.
thanks in advance!
EDIT:
the definition of the getter/setter is this:
public Contact getOriginContact()
public void setOriginContact(Contact newOriginContact)
[Updated on: Mon, 16 September 2013 06:07]
Report message to a moderator