Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Ekeys with mutiple keys
Ekeys with mutiple keys [message #170464] Tue, 29 January 2008 14:03 Go to next message
Eclipse UserFriend
Originally posted by: frederic.ventura.eurogiciel.fr

Hi everybody

I'm trying to modify my ecore model for my GMF diagram editor (linked to a
database)
My diagram contains team/player/match/history...
to do the relation between history and player, I have an EReference in
History (with EreferenceType=player and Ekeys= FirsName, LastName).
My problem is that when tables are created, the link is done using the
player_ID in spite of combination of FirstName and LastName

is there any solution to do this?

I've seen that if ekeys are not ID in target, ekeys are not used and the
database ID is used
The problem is, in case of composed ekeys, I can't use two attributes as
ID in ecore model (when I generate the genmodel, an error is raised : The
features 'firstname' and 'lastname' cannot both be IDs)
Re: Ekeys with mutiple keys [message #170504 is a reply to message #170464] Tue, 29 January 2008 14:46 Go to previous message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Fred,

Keep in mind that a key need not be unique within a resource across all
object types as is the case for an ID; it need only be unique with
respect to the one particular reference. You could define a transient
volatile derived ID feature that combines the first and the last name,
but indeed, if there is an ID, it will be preferred over any other form
of reference. ID's with spaces are likely to cause problems too...


fred wrote:
> Hi everybody
>
> I'm trying to modify my ecore model for my GMF diagram editor (linked
> to a database)
> My diagram contains team/player/match/history...
> to do the relation between history and player, I have an EReference in
> History (with EreferenceType=player and Ekeys= FirsName, LastName).
> My problem is that when tables are created, the link is done using the
> player_ID in spite of combination of FirstName and LastName
>
> is there any solution to do this?
>
> I've seen that if ekeys are not ID in target, ekeys are not used and
> the database ID is used
> The problem is, in case of composed ekeys, I can't use two attributes
> as ID in ecore model (when I generate the genmodel, an error is raised
> : The features 'firstname' and 'lastname' cannot both be IDs)
>
>
>
Previous Topic:Error using SetBoundCommand and CompoundCommand
Next Topic:create containment association at a superclass level
Goto Forum:
  


Current Time: Fri Apr 26 21:47:42 GMT 2024

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

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

Back to the top