How can I edit the value of an attribute of entity B based on the prior selection of the attributes from entity A and C?

0
Hi everyone, I just started using Mendix  and am fascinated with the possibilities of it, but I am running into a problem now that I just don't find the answer to.  This is what my Domain Model looks like. So every player on a team can score (between 1 and 5) on a variety of skills (defined in Skillset entity). What I am trying to accomplish now is to let the user change every 'Individual Skill Score' on every skill of a selected player.  It tried doing this:  And then in the Template View of Skillset I added a  reference selector for 'Individual Skill Score', but then the value cannot be edited.  How can I accomplish that the value can be edited based on which player and skill is selected?
asked
1 answers
2

I think your domain model is not correct. I assume that the skillset is a table with all the skills that players could possible have and the skillscore is the score of that particular player with that skill. Now a skill can only be coupled to one skillscore. This should be multiple (skillscore) to one relation (skillset). And assuming that a player has multiple skillsets you have a many to many relation between players and skillsets, because a skillset can belong to multiple players and each player has multiple skillsets.

If this is so you need the reference set selector so you can add skills to each player. And when editting the skillset you can then place the reference selector to define the skillscore.

And also take a look at your trainer - player relation. I think that a trainer has multiple players but a player probably has only one trainer, now you have also drawn a reference the other way around. Either make this then a multiple to multiple relation or remove this one.

 

Regards,

 

Ronald

answered