You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@olingo.apache.org by "Kiran G (JIRA)" <ji...@apache.org> on 2014/11/10 10:54:33 UTC

[jira] [Comment Edited] (OLINGO-411) [olingo-jpa] Error on $expand for Self joins

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

Kiran G edited comment on OLINGO-411 at 11/10/14 9:54 AM:
----------------------------------------------------------

Hi Chandan,

I don't agree with your argument as each relationship should be identified with a unique name. 

In Employee, manager and subordinates navigation property should use the same Relationship name. But, mentor and mentee should use a different name whch uniquely indentifies this relationship. Also, the From and To roles has to be unique for each relationship.

By the OData specs, this Relationship name should be again defined in the Association element. So, there should be two relationships defined here for 1..N (manager<\->subordinates) and 1..1 (mentor<\->mentee) navigations that exist in Employee.

One suggestion on implementing this multiple navigation is to use _ as suffix instead of 2 for the names. In case the name already exist we can keep appending _'s until it is not used.

You can open a JIRA item and take opinion of others before fixing this.

Regards,
Kiran


was (Author: kiransg):
Hi Chandan,

I don't agree with your argument as each relationship should be identified with a unique name. 

In Employee, manager and subordinates navigation property should use the same Relationship name. But, mentor and mentee should use a different name whch uniquely indentifies this relationship. Also, the From and To roles has to be unique for each relationship.

By the OData specs, this Relationship name should be again defined in the Association element. So, there should be two relationships defined here for 1..N (manager<->subordinates) and 1..1 (mentor<->mentee) navigations that exist in Employee.

One suggestion on implementing this multiple navigation is to use _ as suffix instead of 2 for the names. In case the name already exist we can keep appending _'s until it is not used.

You can open a JIRA item and take opinion of others before fixing this.

Regards,
Kiran

> [olingo-jpa] Error on $expand for Self joins
> --------------------------------------------
>
>                 Key: OLINGO-411
>                 URL: https://issues.apache.org/jira/browse/OLINGO-411
>             Project: Olingo
>          Issue Type: Bug
>          Components: odata2-jpa
>    Affects Versions: V2 2.0.0
>            Reporter: Kiran G
>            Assignee: Chandan V.A
>             Fix For: V2 2.0.2
>
>         Attachments: Employee.java, metadata.xml, metadata.xml, olingo-bug-association.zip, olingo-bug.zip
>
>
> If there is a self join in the JPA entity then the $expand fails. Also, the relationship names seem to be duplicated for both side of relationship.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)