missing Embeddable [message #1064884] |
Fri, 21 June 2013 10:05  |
Eclipse User |
|
|
|
Hello everybody,
I an new to EclipseLink and I try to get a mapping to work.
I have modelled a Person in EMF as an example for a class in a legacy DB with 100+ attributes.
Some of these I want to move to an Additional Object while in the DB these attributes are in the same table.
So, in EMF I modelled Person & Additional, generating classes and Impls.
All working well. Enter the Embeddable
<orm:entity class="model.impl.PersonImpl" name="Person">
<orm:table name="Table_Person" />
<orm:attributes>
...
<orm:embedded name="addi">
<orm:attributes-override name="nonsenseField">
<column name="p_nonsenseField"/>
</orm:attributes-override>
</orm:embedded>
I am getting the following exception:
Exception Description: The Entity class [class model.impl.PersonImpl] has an embedded attribute [addi] of type [class model.Additional] which is NOT an Embeddable class. Probable reason: missing @Embeddable or missing <embeddable> in orm.xml if metadata-complete = true
I have added @Embeddable to PersonImpl, which does not help.
I have added @Embeddable to Person, which does not help either because the Interface Person does not have a default constructor.
I have also tried to declare the embeddable in the orm.xml:
<orm:embedabble class="model.impl.AdditionalImpl">
<attributes>
<basic name="nonsenseField" />
</attributes>
</orm:embedabble>
which does not help either.
what to do?
I have been banging my head against the keyboard all afternoon ...
Hannes
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04555 seconds