[Teneo] Text mapping instead of VarChar [message #103060] |
Sun, 18 November 2007 15:46  |
Eclipse User |
|
|
|
Originally posted by: irbull.cs.uvic.ca
I am creating my Database schema directly from my ECore model (by
passing my ePackage to the hdbs and then calling initialize). All my
String attributes get mapped to columns of type VarChar(255). I have
one attribute that needs more room than this. Is there any easy was to
say (maybe through an EAnnotation) that this database column should be
Text instead of VarChar?
Cheers,
Ian
|
|
|
|
|
|
Re: [Teneo] Text mapping instead of VarChar [message #486828 is a reply to message #486810] |
Sat, 19 September 2009 11:51  |
Eclipse User |
|
|
|
Hi Vincenzo,
The title of the post and the content don't seem in sync....
Also support for Teneo is given on the emf newsgroup: eclipse.tools.emf
gr. Martin
Vincenzo Caselli wrote:
> Thank you very much Ian, your post is great!!
> I was beginning to think that editing the ecore xml was the only way.
> I attached an image to make your steps more clear (if possible). I
> didn't find any documentation about handling these options with the
> ecore Editor. Do someone have some useful link about this?
> Thank you
> Vincenzo Caselli
--
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: [Teneo] Text mapping instead of VarChar [message #612582 is a reply to message #103060] |
Sun, 18 November 2007 15:56  |
Eclipse User |
|
|
|
You can set the @Lob annotation on the efeature. If the edatatype is a string (its instanceclass ==
String.class) then the system should map this as text.
Another way is setting a @Column(length=1000) annotation.
gr. Martin
Ian Bull wrote:
> I am creating my Database schema directly from my ECore model (by
> passing my ePackage to the hdbs and then calling initialize). All my
> String attributes get mapped to columns of type VarChar(255). I have
> one attribute that needs more room than this. Is there any easy was to
> say (maybe through an EAnnotation) that this database column should be
> Text instead of VarChar?
>
> Cheers,
> Ian
--
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] Text mapping instead of VarChar [message #612584 is a reply to message #103080] |
Sun, 18 November 2007 16:34  |
Eclipse User |
|
|
|
WOW! Thanks for the quick response Martin!
Just in case someone else stumbles upon this post, to do this (on your
Ecore file)
1. Select the EAttribute you wish to add the annotation to
2. Add an EAnnotation (with source set to teneo.jpa)
3. Add a details entry
4. set the key to "value"
5. Set the value to "@Lob"
(and don't forget to regenerate your model :) )
Thanks again Martin,
Cheers,
Ian
Martin Taal wrote:
> You can set the @Lob annotation on the efeature. If the edatatype is a
> string (its instanceclass == String.class) then the system should map
> this as text.
> Another way is setting a @Column(length=1000) annotation.
>
> gr. Martin
>
> Ian Bull wrote:
>> I am creating my Database schema directly from my ECore model (by
>> passing my ePackage to the hdbs and then calling initialize). All my
>> String attributes get mapped to columns of type VarChar(255). I have
>> one attribute that needs more room than this. Is there any easy was
>> to say (maybe through an EAnnotation) that this database column should
>> be Text instead of VarChar?
>>
>> Cheers,
>> Ian
>
>
|
|
|
Re: [Teneo] Text mapping instead of VarChar [message #621384 is a reply to message #103096] |
Sat, 19 September 2009 08:39  |
Eclipse User |
|
|
|
Thank you very much Ian, your post is great!!
I was beginning to think that editing the ecore xml was the only way.
I attached an image to make your steps more clear (if possible).
I didn't find any documentation about handling these options with the ecore Editor. Do someone have some useful link about this?
Thank you
Vincenzo Caselli
|
|
|
Re: [Teneo] Text mapping instead of VarChar [message #621385 is a reply to message #621384] |
Sat, 19 September 2009 11:51  |
Eclipse User |
|
|
|
Hi Vincenzo,
The title of the post and the content don't seem in sync....
Also support for Teneo is given on the emf newsgroup: eclipse.tools.emf
gr. Martin
Vincenzo Caselli wrote:
> Thank you very much Ian, your post is great!!
> I was beginning to think that editing the ecore xml was the only way.
> I attached an image to make your steps more clear (if possible). I
> didn't find any documentation about handling these options with the
> ecore Editor. Do someone have some useful link about this?
> Thank you
> Vincenzo Caselli
--
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.06796 seconds