Skip to content

select() constraint is not applied to included objects #1567

Closed

Description

@devshop9

I am running this same query from parse.com and on my local parse server .

var messageQuery = new Parse.Query("Message");
    messageQuery.descending("updatedAt");
    messageQuery.include("channelId");
    messageQuery.select("channelId");
    messageQuery.select("channelId.exchange");

Channeld is pointer field to my other document.
On parse.com server this query works and return result with only exchange field and on parse-server it selects complete channelId document and prints everything.

Activity

  1. devshop9 commented on Apr 20, 2016

    @devshop9
    Author

    Also select works when i am not expanding any pointer fields.

  2. hramos commented on Apr 20, 2016

    @hramos
    Contributor

    Can you include more information, such as example responses that clearly show the difference?

    Please refer to this issue for an example of a great bug report.

  3. MasaGon commented on Jun 17, 2016

    @MasaGon

    I got same issue with Parse Server, when migrating from Parse.com.

    This works fine for getting whole sender fields of a message, where sender is Parse.User object.

    var messageQuery = new Parse.Query(Message);
    messageQuery.descending('createdAt');
    messageQuery.limit(1);
    messageQuery.include(['sender']);
    messageQuery.select(['type', 'body', 'isRead', 'sender']);
    return messageQuery.first({useMasterKey: true});
    

    But if I restrict select parameter to 'sender.phone' from 'sender' like this,

    var messageQuery = new Parse.Query(Message);
    messageQuery.descending('createdAt');
    messageQuery.limit(1);
    messageQuery.include(['sender']);
    messageQuery.select(['type', 'body', 'isRead', 'sender.phone']);
    return messageQuery.first({useMasterKey: true});
    

    no sender information is acquired.

    parse-server@2.2.13

  4. Poordeveloper commented on Jul 9, 2016

    @Poordeveloper

    really a big issue, can only work around on cloud side now.

  5. Ishimilated commented on Jul 24, 2016

    @Ishimilated

    I have the same problem. It worked great on parse.com, but not on the parse server.

  6. hramos commented on Jul 25, 2016

    @hramos
    Contributor

    It seems like the issue is clear at this point: the select() constraint on Parse Server only works for fields on the top level object. It seems like there's interest in replicating parse.com's select() behavior on Parse Server. If someone wants to send a PR to add this enhancement to Parse Server we can take a look.

  7. changed the title [-]Issue with select query on parse-server[/-] [+]select() constraint is not applied to included objects[/+] on Jul 25, 2016
  8. added
    type:bugImpaired feature or lacking behavior that is likely assumed
    and removed on Jul 26, 2016
  9. ossamaweb commented on Aug 11, 2016

    @ossamaweb

    +1

  10. added a commit that references this issue on Sep 19, 2016
  11. added this to the 2.2.22 milestone on Sep 19, 2016
  12. dbloembe commented on Aug 8, 2018

    @dbloembe

    I'm still having trouble with this same issue. Was this ever addressed?

  13. flovilmart commented on Aug 8, 2018

    @flovilmart
    Contributor

    @dbloembe please open a new issue with all relevant informations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:bugImpaired feature or lacking behavior that is likely assumed

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions