[Teneo] Change the default DDL created by Teneo [message #759684] |
Tue, 29 November 2011 10:33  |
Eclipse User |
|
|
|
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 16:02  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.04064 seconds