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

Colm O hEigeartaigh commented on SYNCOPE-1138:
----------------------------------------------

Thanks Francesco. I have two further questions at this point:

a) Is left/right dependent on which object the relationship was initially 
defined on? In the example above, does the PRINTER return a "right-key" for the 
relationship, and the DEVICE a "left-key"? 

b) How can I set the relationship on the other object? I tried in 
AnyObjectDataBinderImpl.create doing something like 
"otherEnd.add(relationship);" after the ARelationship is set on "anyObject", 
but I get an error along the lines of:

   org.apache.openjpa.persistence.InvalidStateException: Encountered unmanaged 
object 
"org.apache.syncope.core.persistence.jpa.entity.anyobject.JPAAnyObject@48eccd7c"
 in life cycle state  unmanaged while cascading persistence via field 
"org.apache.syncope.core.persistence.jpa.entity.anyobject.JPAARelationship.leftEnd"
 during flush.  However, this field does not allow cascade persist. You cannot 
flush unmanaged objects or graphs that have persistent associations to 
unmanaged objects.

> 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