You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by David Blevins <da...@visi.com> on 2008/06/03 23:31:23 UTC
Use of ejb-name vs abstract-schema-name in the generated orm.xml
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
Re: Use of ejb-name vs abstract-schema-name in the generated orm.xml
Posted by David Blevins <da...@visi.com>.
On Jun 3, 2008, at 2:52 PM, Dain Sundstrom wrote:
> 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.
Aha. I wondered if that was the case.
> You could add a @XmlTransient field to the entity JAXB object to
> hold the ejb entity name.
Yea, I'll likely do something like that.
Thanks!
-David
> 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
>>
>
>
Re: Use of ejb-name vs abstract-schema-name in the generated orm.xml
Posted by Dain Sundstrom <da...@iq80.com>.
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
>