[Teneo] Text mapping instead of VarChar [message #103060] |
Sun, 18 November 2007 20: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 #103096 is a reply to message #103080] |
Sun, 18 November 2007 21:34 |
Eclipse User |
|
|
|
Originally posted by: irbull.cs.uvic.ca
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
>
>
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02714 seconds