Aleh Autushka created OLINGO-509:
------------------------------------

             Summary: Problem with several relations of type ManyToMany in one 
entity
                 Key: OLINGO-509
                 URL: https://issues.apache.org/jira/browse/OLINGO-509
             Project: Olingo
          Issue Type: Bug
          Components: odata2-core, odata2-jpa
    Affects Versions: V2 2.0.1
            Reporter: Aleh Autushka
            Priority: Critical


Hello,

Something strange is happening when I try to specify several relations of type 
manyToMany in one entity (lets say relation A from entity 'a' to entity 'b' and 
B from entity 'a' to entity 'c'). If I keep just relation 
A or just relation B I can see this relation in the metadata with Multiplicity 
* to *.
When I keep both - both relations are gone from the metadata.

Here are relations representation in JPA:
    @ManyToMany(targetEntity=Phase.class)
    @JoinTable(name="user_phase",joinColumns = @JoinColumn(name="userName", 
referencedColumnName="userName"), inverseJoinColumns = @JoinColumn(name = 
"phaseGuid", referencedColumnName="guid")) 
    private java.util.Collection<Phase> phases;                 
        
    @ManyToMany(targetEntity=Role.class)
    @JoinTable(name="user_role",joinColumns = @JoinColumn(name="userName", 
referencedColumnName="userName"), inverseJoinColumns = @JoinColumn(name = 
"roleName", referencedColumnName="roleName")) 
    private java.util.Collection<Role> roles;


With best regards, Aleh




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

Reply via email to