Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Association class doubt
Association class doubt [message #1784242] Sat, 24 March 2018 11:42 Go to next message
Eduardo Gutierrez is currently offline Eduardo GutierrezFriend
Messages: 48
Registered: December 2017
Member
I need to use an association class: between players ( juagador) and games ( partit).
In the association class i need to save the position that the player had in that game. ( player can play different positions in different games along a league).

So i have to write two things: the relation between player and games ( one player can play zero or many games, one game is played by many players) and then add the association class....

note: posiciojugadorpartit is playerpositionintheGame

I have

index.php/fa/32437/0/
  • Attachment: Captura.PNG
    (Size: 13.02KB, Downloaded 1297 times)

[Updated on: Sat, 24 March 2018 11:45]

Report message to a moderator

Re: Association class doubt [message #1784275 is a reply to message #1784242] Mon, 26 March 2018 07:41 Go to previous messageGo to next message
Camille Letavernier is currently offline Camille LetavernierFriend
Messages: 952
Registered: February 2011
Senior Member
Hi,

I'm not sure what the question is exactly; but it seems that both associations are redundant. Having only the AssociationClass should be sufficient (Since, I believe, the player can't have a position in a Game where he doesn't play).

So having just the AssociationClass, carrying the roles and multiplicities of the Association, should be fine.

Camille


Camille Letavernier
Re: Association class doubt [message #1784287 is a reply to message #1784275] Mon, 26 March 2018 10:11 Go to previous messageGo to next message
Eduardo Gutierrez is currently offline Eduardo GutierrezFriend
Messages: 48
Registered: December 2017
Member
Camille Letavernier sorry the question if im doing it the right way. In UML Standard when you draw the association class ( you can configure the right and left side of relationship ( one, 0, zero or more, one or more..) ) but in papyrus i cant ( as you can see in the image below) . Should be a kind of 3-ary relationship with player, game and position. I cant configure the relationship as in "normal association" i can, with two member ends, roles names, multiplicity, visibility.... i only can configure the association class

index.php/fa/32446/0/

So to assure i generated the code in Java, and if i only use the association class it doesnt appear the elements of the relationship ( in jugador ( player) has to appear an array of partits ( games) and identically in partit ( game) has to appear an array of jugadors (players) ). And it doesnt

I agree with you that is redundant but in papyrus i have to do it with two relations ( the association class and "the normal" association). So perhaps a bug or something to improve in papyrus, or im doing something wrong....

Hope i have explained myself better, sorry for my bad english.. ;) and thanks again for your help..

[Updated on: Thu, 29 March 2018 08:52]

Report message to a moderator

Re: Association class doubt [message #1784550 is a reply to message #1784287] Thu, 29 March 2018 08:55 Go to previous messageGo to next message
Eduardo Gutierrez is currently offline Eduardo GutierrezFriend
Messages: 48
Registered: December 2017
Member
Any suggestions ? Is a bug ?

Thanks

@Camille Letavernier
Re: Association class doubt [message #1784582 is a reply to message #1784550] Thu, 29 March 2018 14:34 Go to previous messageGo to next message
Camille Letavernier is currently offline Camille LetavernierFriend
Messages: 952
Registered: February 2011
Senior Member
Hi,

It is indeed a bug in Papyrus, where AssociationClasses have the properties of a Class, but not the ones from the Association (They should have both)

You may still select the AssociationClass' member ends in the ModelExplorer directly, and define the roles/multiplicities there.

HTH,
Camille


Camille Letavernier
Re: Association class doubt [message #1784590 is a reply to message #1784582] Thu, 29 March 2018 17:25 Go to previous message
Eduardo Gutierrez is currently offline Eduardo GutierrezFriend
Messages: 48
Registered: December 2017
Member
Thanks im going mad.... is planned to be a patch in a near future ?
Are you a dev in PaPyrus ? Because i think also there is a bug with n-ary relationships. I wish to add a associated class in a 3-ary class and i cant. I would like to join Association class to the join point between classes, and i need to select two classes to insert an association class

I need to implement something like: a doctor, have visit one patient and set a diagnosisi. The visit has date and time. So id like to join the visit association class to the join point of the 3-ary relationship

Thanks for your help
@Camille Letavernier

index.php/fa/32496/0/
Previous Topic:Constraint Language
Next Topic:Command in EditHelperAdvice
Goto Forum:
  


Current Time: Fri Apr 19 16:07:02 GMT 2024

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

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

Back to the top