The <entity> "name" is the to refer to the bean in EJB-QL, so if the user defined an abstract-schema-name in the ejb-jar.xml file, it must be the same name used for the JPA entity.

You could add a @XmlTransient field to the entity JAXB object to hold the ejb entity name.

-dain

On Jun 3, 2008, at 2:31 PM, David Blevins wrote:

Class: CmpJpaConversion.java
Method: generateEntityMappings

We're setting the generated <entity> "name" attribute to be the abstract schema name of the cmp bean. Is that absolutely required? Specifically, does the name get used in JPA-land in some significant way or is it more for display purposes?

Trying to understand/change some of the code the generateEntityMappings method. We're currently indexing the generated o.a.openejb.jee.jpa.Entity objects by ejb-name and using the map for cmp relationship resolution. I'd like to change the Entity "name" field to be ejb-name rather than abstract-schema-name so I can index all the entities in the o.a.openejb.jee.jpa.EntityMappings object and use them for relationship mapping. We currently don't keep the ejb-name in the Entity object anywhere, hence the change of making the entity name the ejb-name.

-David


Reply via email to