[ 
https://issues.apache.org/jira/browse/SYNCOPE-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16073275#comment-16073275
 ] 

Francesco Chicchiriccò commented on SYNCOPE-1138:
-------------------------------------------------

See my views about above:

{quote}
Should we report both ends of the relationship or only the "opposite" end of 
the Relationship via RelationshipTO? It seems a bit redundant for example to 
state the left hand side of a relationship if it is the same AnyType that is 
being returned.
{quote}

To me, only the other side of the releationship: if the PRINTER 
39dc472f-7917-4e9b-adb3-0be7ce2bf43c has relationship with DEVICE 
a3121573-3e20-4165-bb56-8ce935b18bc7, then when reading 
39dc472f-7917-4e9b-adb3-0be7ce2bf43c I would expect a {{RelationshipTO}} 
instance where {{"other": "a3121573-3e20-4165-bb56-8ce935b18bc7"}}; when 
reading a3121573-3e20-4165-bb56-8ce935b18bc7, I would expect a 
{{RelationshipTO}} instance where {{"other": 
"39dc472f-7917-4e9b-adb3-0be7ce2bf43c"}}.

Naturally, this must be handled even during {{POST}} and {{PATCH}}.

{quote}
Should we do the same for MembershipTO?
{quote}

No, memberships are only reported with Users / AnyObjects, not for Groups, 
hence the other end is always a Group.

{quote}
What is the best way to set the "opposite" side of the Relationship? For 
example, when returning an AnyType object, should we search for the "left" 
relationships associated with this object. Or when setting a relationship in 
the opposite direction on creation/update, do we then set it on the other side 
of the relationship?
{quote}

I think I have replied to that as well with my first answer above.

> Update RelationshipTO to also report the "left" end of a relationship
> ---------------------------------------------------------------------
>
>                 Key: SYNCOPE-1138
>                 URL: https://issues.apache.org/jira/browse/SYNCOPE-1138
>             Project: Syncope
>          Issue Type: Improvement
>          Components: common, console, core
>            Reporter: Colm O hEigeartaigh
>            Assignee: Colm O hEigeartaigh
>             Fix For: 2.0.5, 2.1.0
>
>
> Currently, the RelationshipTO object only reports the "right" end of a 
> relationship. However, as relationships in Syncope are bi-directional, we 
> should also report the "left" end of a relationship. This will make searching 
> for AnyTypes a bit easier than it is at present.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to