Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Teneo] Change the default DDL created by Teneo(How to change the length of a particular field after Teneo init.)
[Teneo] Change the default DDL created by Teneo [message #759684] Tue, 29 November 2011 15:33 Go to next message
CarlosM  is currently offline CarlosM Friend
Messages: 5
Registered: November 2011
Junior Member
Hi.

I have some models to be persisted in Teneo and there is some properties, which data length exceeds the default length of the database field (type varchar I guess because that properties are Strigs). Therefore, I can't persist properly my models...

I would like to know how to get that field larger in my MySQL DB (instead the default length, a varchar of 8192) after the initialization...

I have seen annotations like the following:

<eClassifiers xsi:type="ecore:EClass" name="xxxx" abstract="true">
<eAnnotations source="teneo.jpa">
<details key="value" value="@Column(length=8192)"/>
</eAnnotations>


but I don't know exactly how to apply them (maybe using some kind of generator, but the menu option of the Eclipse IDE, which is called 'Teneo' liekely to generate de hbm files, doesn't work fine (probably due to a missing artifacts).

So... please, what's the simplest way to solve this issue? Is there any way of giving parameters about the metamodel to the Teneo initialization?
Any other suggestion?

Thank you very much in advance.
Best regards.
Carlos.
Re: [Teneo] Change the default DDL created by Teneo [message #759761 is a reply to message #759684] Tue, 29 November 2011 21:02 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Carlos,
You can add annotations in 2 ways:
- in the xsd or the ecore file
- in a separate xml file
http://wiki.eclipse.org/Teneo/Hibernate/ModelRelational/Annotations_Format

see for other wiki articles here:
http://wiki.eclipse.org/Teneo/Hibernate#Model_Relational_Mapping_with_EJB3.2FJPA_Annotations

gr. Martin

On 11/29/2011 04:33 PM, CarlosM wrote:
> Hi.
>
> I have some models to be persisted in Teneo and there is some properties, which data length exceeds the default length
> of the database field (type varchar I guess because that properties are Strigs). Therefore, I can't persist properly my
> models...
>
> I would like to know how to get that field larger in my MySQL DB (instead the default length, a varchar of 8192) after
> the initialization...
>
> I have seen annotations like the following:
>
> <eClassifiers xsi:type="ecore:EClass" name="xxxx" abstract="true">
> <eAnnotations source="teneo.jpa">
> <details key="value" value="@Column(length=8192)"/>
> </eAnnotations>
>
> but I don't know exactly how to apply them (maybe using some kind of generator, but the menu option of the Eclipse IDE,
> which is called 'Teneo' liekely to generate de hbm files, doesn't work fine (probably due to a missing artifacts).
>
> So... please, what's the simplest way to solve this issue? Is there any way of giving parameters about the metamodel to
> the Teneo initialization?
> Any other suggestion?
>
> Thank you very much in advance.
> Best regards.
> Carlos.
>


--

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:Generating ecore diagram image file programmatically
Next Topic:[EMF4NET] Project status?
Goto Forum:
  


Current Time: Fri Oct 23 03:02:45 GMT 2020

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

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

Back to the top