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

Refactor the V4 $levels implementation

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • (Java) V4 4.1.0
    • (Java) V4 4.4.0
    • odata4-server
    • None

    Description

      Refactor the V4 $levels implementation based on the code review notes:

      There have been ExpandSelectHelper changes. If they are not needed revert them.

      With version 4.3.0 EntityIds became mandatory in the ODataEntity object. Revert this change.
      -> If not there generate the key
      -> if not possible to generate because key fields are missing or the id field isn`t set but the Id is mandatory then throw an exception

      $levels specific:
      Do not check for ancestors based on the ODataEntity ID. Just use object references and comape with ==
      $levels=1 expandes Navigation properties for the first level. $levels=1 has the same functionality as leaving it away.

      ExpandSelectHelper getExpandAll and isExpandAll have the same functionallity. Remove on method.

      Important:
      Only navigation properties of the same type get expanded. Not all of them. This is a bug.
      Refactor navigation property serialization. There should only be one call to writeExpandedNavigation property! Not multiple ones based on some flags etc.

      Check for cycle only if navigation property has to be expanded.

      Attachments

        1. f7aa6aac.diff
          36 kB
          Archana Rai

        Activity

          People

            chrisam Christian Amend
            archanarai Archana Rai
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: