teneo and ID [message #71715] |
Thu, 15 February 2007 05:20  |
Eclipse User |
|
|
|
Originally posted by: pascalpugatsch.hotmail.com
Hi,
relating to the annotations of my model I'd like to ask if there's a way
to specify a "@GeneratedValue" of GUID as id type?
Thanks,
Pascal
|
|
|
|
|
|
Re: teneo and ID [message #71808 is a reply to message #71789] |
Thu, 15 February 2007 12:02  |
Eclipse User |
|
|
|
Originally posted by: pascalpugatsch.hotmail.com
Thanks Martin!
I used an older version and updated now to Teneo 0.8.0.
When I set the GenericGenerator on EPackage level it works perfect!
cheers, Pascal
|
|
|
Re: teneo and ID [message #602603 is a reply to message #71715] |
Thu, 15 February 2007 07:04  |
Eclipse User |
|
|
|
Hi Pascal,
You can try the following. First set this annotation (at epackage level or at the id eattribute):
@GenericGenerator(name="system-guid", strategy = "guid")
and then for the id eattribute set:
@GeneratedValue(generator="system-guid")
gr. Martin
Pascal Pugatsch wrote:
> Hi,
>
> relating to the annotations of my model I'd like to ask if there's a way
> to specify a "@GeneratedValue" of GUID as id type?
>
> Thanks,
> Pascal
--
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 and ID [message #602617 is a reply to message #71734] |
Thu, 15 February 2007 10:43  |
Eclipse User |
|
|
|
Originally posted by: pascalpugatsch.hotmail.com
Hi Martin,
still not working.
when I have the annotations for my model:
/**
@model unique="true" unsettable="true"
dataType="org.eclipse.emf.ecore.xml.type.String" required="false"
* annotation="teneo.jpa
appinfo='\n\t\t\t\t@Id\n\t\t\t\t@GenericGenerator(name=\"system-guid\",
strategy = \"guid\")\n\t\t\t'"
* annotation="teneo.jpa
appinfo='\n\t\t\t\t@Id\n\t\t\t\t@GeneratedValue(generator=\"system-guid\")\n\t\t\t'"
* extendedMetaData="kind='element' name='id'"
*/
I get:
2007-02-15 16:37:30,503 ERROR [-main] parser.AnnotationParserException
- The eclass: HbAnnotatedEAttribute does not have an efeature for
GenericGenerator
org.eclipse.emf.teneo.annotations.parser.AnnotationParserExc eption: The
eclass: HbAnnotatedEAttribute does not have an efeature for
GenericGenerator
cheers,
Pascal
|
|
|
Re: teneo and ID [message #602620 is a reply to message #71770] |
Thu, 15 February 2007 10:47  |
Eclipse User |
|
|
|
Hi Pascal,
Which version of Teneo are you working with? In a newer release (like 2 weeks old) this should work.
If you have an older release then the GenericGenerator annotation should be set on the epackage and
the GeneratedValue on the eattribute.
gr. Martin
Pascal Pugatsch wrote:
> Hi Martin,
>
> still not working.
>
> when I have the annotations for my model:
> /**
> @model unique="true" unsettable="true"
> dataType="org.eclipse.emf.ecore.xml.type.String" required="false"
> * annotation="teneo.jpa
> appinfo='\n\t\t\t\t@Id\n\t\t\t\t@GenericGenerator(name=\"system-guid\",
> strategy = \"guid\")\n\t\t\t'"
> * annotation="teneo.jpa
> appinfo='\n\t\t\t\t@Id\n\t\t\t\t@GeneratedValue(generator=\"system-guid\")\n\t\t\t'"
>
> * extendedMetaData="kind='element' name='id'"
> */
>
> I get:
> 2007-02-15 16:37:30,503 ERROR [-main]
> parser.AnnotationParserException - The eclass: HbAnnotatedEAttribute
> does not have an efeature for GenericGenerator
> org.eclipse.emf.teneo.annotations.parser.AnnotationParserExc eption: The
> eclass: HbAnnotatedEAttribute does not have an efeature for
> GenericGenerator
>
> cheers,
> Pascal
>
--
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 and ID [message #602624 is a reply to message #71789] |
Thu, 15 February 2007 12:02  |
Eclipse User |
|
|
|
Originally posted by: pascalpugatsch.hotmail.com
Thanks Martin!
I used an older version and updated now to Teneo 0.8.0.
When I set the GenericGenerator on EPackage level it works perfect!
cheers, Pascal
|
|
|
Powered by
FUDForum. Page generated in 0.05993 seconds