One-to-One Bidirectional Relationship

Right now, we have a unidirectional one-to-one mapping which means that if we have a Twitter account, we cannot find the name of the player who has that account. A GET request to /profiles only gets the PlayerProfile object and not the Player it is associated with.

It is however possible to find the Twitter account, if we have the Player entity. As can be seen from a GET request to /players, the PlayerProfile entities are also fetched.

Get hands-on with 1400+ tech skills courses.