Uploaded image for project: 'Olingo'
  1. Olingo
  2. OLINGO-42

jpa processor requires a redundant field for many-to-one relationships

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • V2 1.0.0
    • V2 1.1.0
    • odata2-jpa
    • None
    • windows7, tomcat 7.0.42, hsql, eclipse link 2.5.0

    Description

      It looks like that the only way to get a consistent EDM associations model and the corresponding navigation properties, when there are many-to-one (bi-directional) managed relationships, is to add an additional and redundant property, annotated with @Column to the owning class. Same as in your reference jpa model.
      However, it's highly unlikely that one models a JPA model like this in reality and quite an impairment particularly for existing models.
      I'm not sure why is that needed, because the information encoded in the required field @Column annotation is redundant with the one @JoinColumn annotation and you already parse the JoinColumn anyways.
      So probably that's a low hanging fruit?

      I also realized that specifying the optional in the JPA @JoinColumn annotaiton property referencedColumnName is yet another mandatory requirement for the JPA edm producer to create a valid navigation properties set.

      Attachments

        Activity

          People

            chandan.v.a Chandan V.A
            shturec Georgi
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: