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

java proxy code: duplicated $select, $expand, $skip & $top in query URL.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • (Java) V4 4.0.0-beta-01
    • (Java) V4 4.0.0-beta-01
    • odata4-client
    • None

    Description

      public MessageCollection getMessages(String folderId, int from) {

      MessageCollection messages = null;

      try

      { messages = container.getMe().getFolders().getByKey(folderId) .getMessages() .select("Id,From,Sender,Subject,BodyPreview,DateTimeSent") .expand("From,Sender").skip(from) .top(mBuilder.getMaxResults()) .execute(); }

      catch (Throwable t)

      { Log.e("Client", t.getMessage()); }

      return messages;
      }

      The first time I call it, creates this request with the mentioned Odata operators:

      ~/Me/Folders('AAMkADg0N2IyYmY3LWY4ZDktNDczNy1iNjAwLTcwYjhhOWM0YjM0MgAuAAAAAABUiwVVm9hQT4oWiN47MJamAQAHg_6kMOm8T7tGK7OZBwRsAAAA999fAAA=')/Messages?$select=Id,From,Sender,Subject,BodyPreview,DateTimeSent,Id,From,Sender,Subject,BodyPreview,DateTimeSent&$expand=From,Sender,From,Sender&$skip=10&$top=10

      But when I try to call it again this is what happens:

      ~//Me/Folders('AAMkADg0N2IyYmY3LWY4ZDktNDczNy1iNjAwLTcwYjhhOWM0YjM0MgAuAAAAAABUiwVVm9hQT4oWiN47MJamAQAHg_6kMOm8T7tGK7OZBwRsAAAA999fAAA=')/Messages?$select=Id,From,Sender,Subject,BodyPreview,DateTimeSent,Id,From,Sender,Subject,BodyPreview,DateTimeSent&$expand=From,Sender,From,Sender&$skip=10,20&$top=10,10

      Attachments

        Activity

          People

            fmartelli Fabio Martelli
            challenh Challen He
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: