Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Teneo] new user questions
[Teneo] new user questions [message #85058] Fri, 25 May 2007 17:52 Go to next message
Jason Henriksen is currently offline Jason HenriksenFriend
Messages: 231
Registered: July 2009
Senior Member
Hi All,

I'm very excited about the use of teneo but I'm running into a couple of
basic problems, both of which have to do with controlling the mapping. For
reference, I'm using the 0.8.0 version on EMF/SDO objectes generated from
XSD in RAD 7.

Here's my teneo.annotations.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<epackage
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:schemaLocation="http://www.elver.org/xsd/teneo/persistence-mapping-hiber
nate.xsd">

<!-- This has no effect -->
<eclass name="CreateType">
<transient/>
</eclass>

<!-- Neither does this -->
<eclass name="VSPDate">
<embeddable/>
</eclass>
<eclass name="VSPDateTime">
<embeddable/>
</eclass>
</epackage>

I have never used teneo or emf for a large project before, and only used
hibernate years ago. My goal is to make the CreateType not appear in the
database at all (It's just a SOAP wrapper) and I'd like the date objects to
be embedded directly into the table that uses them instead of them being a
sepeate table connected with a join.

Is this possible right now? I saw some posts about problems with transient,
but I wasn't sure if there was a way to work around that or not. I also
some something that I could make a specific use of an object embedded, but I
haven't found a way to make all uses of an object type embedded.

My teneo.properties file only contains:
PersistenceOptions.PERSISTENCE_XML=teneo.annotations.xml

Both the properties and the xml are located in the same place as the
documenation puts the hibernate.properties and the log4j.properties. I only
mention this because the output log doesn't mention anything about loading
the annotations...

Thank you for any suggestions you could offer,

Jason Henriksen
Re: [Teneo] new user questions [message #85074 is a reply to message #85058] Fri, 25 May 2007 18:32 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Jason,
The persistence xml option should be a classpath resource, so you need to add the / before the xml
filename:
PersistenceOptions.PERSISTENCE_XML=/teneo.annotations.xml
(this assumes that the teneo.annotations.xml is in the root of the classpath)

There is no option yet to let an embeddable class be embedded everywhere. You currently have to set
the Embedded annotation on each ereference. Please enter a bugzilla feature request to let Teneo
automatically embed all embeddable types.

gr. Martin

Jason Henriksen wrote:
> Hi All,
>
> I'm very excited about the use of teneo but I'm running into a couple of
> basic problems, both of which have to do with controlling the mapping. For
> reference, I'm using the 0.8.0 version on EMF/SDO objectes generated from
> XSD in RAD 7.
>
> Here's my teneo.annotations.xml file:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <epackage
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>
> xsi:schemaLocation="http://www.elver.org/xsd/teneo/persistence-mapping-hiber
> nate.xsd">
>
> <!-- This has no effect -->
> <eclass name="CreateType">
> <transient/>
> </eclass>
>
> <!-- Neither does this -->
> <eclass name="VSPDate">
> <embeddable/>
> </eclass>
> <eclass name="VSPDateTime">
> <embeddable/>
> </eclass>
> </epackage>
>
> I have never used teneo or emf for a large project before, and only used
> hibernate years ago. My goal is to make the CreateType not appear in the
> database at all (It's just a SOAP wrapper) and I'd like the date objects to
> be embedded directly into the table that uses them instead of them being a
> sepeate table connected with a join.
>
> Is this possible right now? I saw some posts about problems with transient,
> but I wasn't sure if there was a way to work around that or not. I also
> some something that I could make a specific use of an object embedded, but I
> haven't found a way to make all uses of an object type embedded.
>
> My teneo.properties file only contains:
> PersistenceOptions.PERSISTENCE_XML=teneo.annotations.xml
>
> Both the properties and the xml are located in the same place as the
> documenation puts the hibernate.properties and the log4j.properties. I only
> mention this because the output log doesn't mention anything about loading
> the annotations...
>
> Thank you for any suggestions you could offer,
>
> Jason Henriksen
>
>
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
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: [Teneo] new user questions [message #606801 is a reply to message #85058] Fri, 25 May 2007 18:32 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Jason,
The persistence xml option should be a classpath resource, so you need to add the / before the xml
filename:
PersistenceOptions.PERSISTENCE_XML=/teneo.annotations.xml
(this assumes that the teneo.annotations.xml is in the root of the classpath)

There is no option yet to let an embeddable class be embedded everywhere. You currently have to set
the Embedded annotation on each ereference. Please enter a bugzilla feature request to let Teneo
automatically embed all embeddable types.

gr. Martin

Jason Henriksen wrote:
> Hi All,
>
> I'm very excited about the use of teneo but I'm running into a couple of
> basic problems, both of which have to do with controlling the mapping. For
> reference, I'm using the 0.8.0 version on EMF/SDO objectes generated from
> XSD in RAD 7.
>
> Here's my teneo.annotations.xml file:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <epackage
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>
> xsi:schemaLocation="http://www.elver.org/xsd/teneo/persistence-mapping-hiber
> nate.xsd">
>
> <!-- This has no effect -->
> <eclass name="CreateType">
> <transient/>
> </eclass>
>
> <!-- Neither does this -->
> <eclass name="VSPDate">
> <embeddable/>
> </eclass>
> <eclass name="VSPDateTime">
> <embeddable/>
> </eclass>
> </epackage>
>
> I have never used teneo or emf for a large project before, and only used
> hibernate years ago. My goal is to make the CreateType not appear in the
> database at all (It's just a SOAP wrapper) and I'd like the date objects to
> be embedded directly into the table that uses them instead of them being a
> sepeate table connected with a join.
>
> Is this possible right now? I saw some posts about problems with transient,
> but I wasn't sure if there was a way to work around that or not. I also
> some something that I could make a specific use of an object embedded, but I
> haven't found a way to make all uses of an object type embedded.
>
> My teneo.properties file only contains:
> PersistenceOptions.PERSISTENCE_XML=teneo.annotations.xml
>
> Both the properties and the xml are located in the same place as the
> documenation puts the hibernate.properties and the log4j.properties. I only
> mention this because the output log doesn't mention anything about loading
> the annotations...
>
> Thank you for any suggestions you could offer,
>
> Jason Henriksen
>
>
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
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:[Teneo] new user questions
Next Topic:Re: [Teneo] new user questions
Goto Forum:
  


Current Time: Thu Mar 28 12:50:00 GMT 2024

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

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

Back to the top