Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Re: Support of EJB3/JPA OR mapping by TENEO
Re: Support of EJB3/JPA OR mapping by TENEO [message #425830] Tue, 09 December 2008 14:16 Go to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Sanjeev,
There are probably some differences in the mapping. I would generate the same mapping file through
Teneo and then do a comparison. Then if you specific differences post them here (or better in the
EMF newsgroup) and I can give more background info.

gr. Martin

Sanjeev wrote:
> Hi,
>
> Myself Sanjeev Kumar from Lufthansa System. This regarding the support
> of EJB3/JPA by TENEO. I am doing some proof of concept(POC) with
> TENEO,EJB3/JPA and hibernate. The restriction from my side is that I
> cannot annotate the model with OR mapping due to power desinger
> limitation. I did the following POCs:
>
> 1. I generated the hibernate OR mapping file using power designer, and
> configured the teneo to lookup this mapping file instead of generating
> it own in memory (by using PersistenceOptions.USE_MAPPING_FILE, as
> "true"). I am able to save and retreive domains object using this strategy.
>
> 2. In the second test, instead of using the hibernate mapping file, I
> have generated the OR mapping file (EJB3/JPA compliance) using power
> designer. As mentioned above, I cann't annote the model itself due to
> tool limitation. I am exploring the teneo to configure it to use this OR
> mapping file. I am not sure wthether this can be possible with TENEO or
> not.
> Request you to please let me know, does TENEO can be configures to work
> in this way.
>
> Thanks & Regards,
> Sanjeev
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: Support of EJB3/JPA OR mapping by TENEO [message #425835 is a reply to message #425830] Tue, 09 December 2008 17:03 Go to previous messageGo to next message
Sanjeev is currently offline SanjeevFriend
Messages: 5
Registered: July 2009
Junior Member
Many thanks Martin for the quick reply.
Please correct me If I am wrong, I suppose the schema used by TENEO for
the EJB3/JPA compliance OR mapping file is different from the schema used
by EJB3/JPA standards.

e.g. TENEO uses the following knid of OR mapping XML.
<persistence-mapping xmlns="http://www.eclipse.org/emft/teneo"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<epackage
namespace-uri=" http://www.eclipse.org/emf/teneo/samples/emf/annotations/inh eritancemapping">
<eclass name="ContentList">
<property name="name">
<id/>
</property>
</eclass>
<eclass name="Price">
<table name="myprice"/>
<inheritance>SINGLE_TABLE</inheritance>
...
</eclass>
</epackage>
</persistence-mapping>

where as EJB3/JPA standards uses following kind of OR mapping XML:

<entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm
orm_1_0.xsd"
version="1.0">
<entity class="CustomerImpl" name="Customer" access="PROPERTY"
metadata-complete="true">
<description>Generated class mapping for abbreviation</description>
<table name="Customer">
..
...
<attributes>
<id name="customerId">
<column name="customerId" nullable="false" insertable="true"
updatable="true"/>
</id>
</attributes>
</entity>
</entity-mappings>

These two OR mapping XMLs seems to use different schemas.
Please guide me if my understanding is incorrect.

Many thanks in advance.

Warm Regards,
Sanjeev
Re: Support of EJB3/JPA OR mapping by TENEO [message #425840 is a reply to message #425835] Tue, 09 December 2008 19:16 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Sanjeev,
Correct the xml of Teneo is aimed at offering a possibility to annotate the model not to follow the
orm EJB3/JPA spec. Now I also understand what you mean, I thought that you were generating a
Hibernate hbm file and not an orm file.
So I am afraid that currently the answer to your question is that this is not possible (generate an
orm file and use that as input to Teneo).

gr. Martin

Sanjeev wrote:
> Many thanks Martin for the quick reply. Please correct me If I am wrong,
> I suppose the schema used by TENEO for the EJB3/JPA compliance OR
> mapping file is different from the schema used by EJB3/JPA standards.
>
> e.g. TENEO uses the following knid of OR mapping XML.
> <persistence-mapping xmlns="http://www.eclipse.org/emft/teneo"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <epackage
> namespace-uri=" http://www.eclipse.org/emf/teneo/samples/emf/annotations/inh eritancemapping">
>
> <eclass name="ContentList">
> <property name="name">
> <id/>
> </property>
> </eclass>
> <eclass name="Price">
> <table name="myprice"/>
> <inheritance>SINGLE_TABLE</inheritance>
> ...
> </eclass>
> </epackage>
> </persistence-mapping>
>
> where as EJB3/JPA standards uses following kind of OR mapping XML:
>
> <entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm
> orm_1_0.xsd" version="1.0">
> <entity class="CustomerImpl" name="Customer" access="PROPERTY"
> metadata-complete="true">
> <description>Generated class mapping for abbreviation</description>
> <table name="Customer">
> ..
> ...
> <attributes>
> <id name="customerId">
> <column name="customerId" nullable="false" insertable="true"
> updatable="true"/>
> </id>
> </attributes>
> </entity>
> </entity-mappings>
>
> These two OR mapping XMLs seems to use different schemas.
> Please guide me if my understanding is incorrect.
>
> Many thanks in advance.
>
> Warm Regards,
> Sanjeev
>
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Previous Topic:[CDO] Multiple resource creation bug ?
Next Topic:emf export
Goto Forum:
  


Current Time: Thu Apr 18 02:10:23 GMT 2024

Powered by FUDForum. Page generated in 0.02140 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top