Hi,
The model is probably incorrect, but the abstract class ROLE is in a dependency.
But his attribute “actor” is of type @ANY, so I have to pass his @AnyMetaDef to him.
In my example, if I put it in ecore.jar @AnyMetaDef it does not know the implementations and if I put it in efluid.jar, when loading the persistent.xml in ecore, it will tell me that it cannot find any @AnyMetaDef with the name “ACTEUR”.
An idea ?
@Entity
@Table(name = "TROLE")
@Inheritance(strategy = SINGLE_TABLE)
@DiscriminatorColumn(name="ROLE", length = 80)
public abstract class Role {
@Any(metaDef = "ACTEUR", metaColumn = @Column(name = "ACTEUR_ROLE", length = 80), fetch = LAZY)
@JoinColumn(name = "ACTEUR_ID", columnDefinition = "varchar2(80 char)")
private ActeurEcore acteur;
...
}
package-info.java in efluid.jar
@AnyMetaDef(
name = "ACTEUR",
idType = "string",
metaType = "string",
metaValues = {
@MetaValue(value = "com.hermes.ref.acteur.businessobject.Acteur", targetEntity = Acteur.class),
@MetaValue(value = "com.hermes.ref.acteur.businessobject.ActeurGenerique", targetEntity = ActeurGenerique.class),
@MetaValue(value = "com.hermes.ref.acteur.businessobject.ActeurInterne", targetEntity = ActeurInterne.class),
@MetaValue(value = "com.hermes.ref.acteur.businessobject.AgenceBancaire", targetEntity = AgenceBancaire.class),
@MetaValue(value = "com.hermes.ref.acteur.businessobject.Agent", targetEntity = Agent.class)
}