Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » teneo and ID
teneo and ID [message #71715] Thu, 15 February 2007 10:20 Go to next message
Eclipse UserFriend
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 #71734 is a reply to message #71715] Thu, 15 February 2007 12:04 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
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 #71770 is a reply to message #71734] Thu, 15 February 2007 15:43 Go to previous messageGo to next message
Eclipse UserFriend
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 #71789 is a reply to message #71770] Thu, 15 February 2007 15:47 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
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 #71808 is a reply to message #71789] Thu, 15 February 2007 17:02 Go to previous message
Eclipse UserFriend
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 12:04 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
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 15:43 Go to previous message
Eclipse UserFriend
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 15:47 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
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 17:02 Go to previous message
Eclipse UserFriend
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
Previous Topic:teneo and ID
Next Topic:Why is the unique attribute of EAttribute ignored?
Goto Forum:
  


Current Time: Fri Apr 26 07:15:35 GMT 2024

Powered by FUDForum. Page generated in 0.03896 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top