|
Re: Texo: How to annotate database data type? [message #872004 is a reply to message #871992] |
Tue, 15 May 2012 09:30 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Hi Olaf,
Create an annotation model (right click on the ecore file and then through the texo submenu create one), create an empty
annotation model first, open it in the editor,
then right click on the top node, do new child, create an epackage child, set the epackage property to the epackage you
want to annotate
right click on the epackage, new child, eclass, for the eclass you want to annotate, set the eclass property,
right click on the eclass, new child, eattribute, for the eattribute you want to annotated, set the eattribute property
right click on the eattribute, new child, orm annotation
right click on the orm annotation, new child, Basic
right click on the new basic node, column,
set the length property of the column
See the attached screenshot for an example.
Note: you can always change the generated code also, so if you only have some minor extra things in model elements which
will never change then go to the generated code, find the field/getter/setter with the orm annotation, change the
javadoc: @generated to @generatedNOT and then add a @Column annotation manually in the java code.
gr. Martin
On 05/15/2012 11:03 AM, Olaf Burdziakowski wrote:
> In my class there is element that java type is String but it should be longer than varchar(255) - default value. I would
> like to have more than 15000 characters. How to annotate this?
--
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@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03602 seconds