Skip to content

orderBy queries in subscribing trigger "Additional properties not supported" by Parse Server #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
rogerhu opened this issue Mar 20, 2017 · 0 comments

Comments

@rogerhu
Copy link
Contributor

rogerhu commented Mar 20, 2017

Take this Parse server example:

   // op=subscribe, className=Message, roomName=null, requestId=1, order=createdAt

  ParseQuery<Message> parseQuery = ParseQuery.getQuery(Message.class);
                    parseQuery.whereEqualTo("roomName", "test");
                    parseQuery.orderByAscending("createdAt");

The same query in Swift doesn't cause this issue. The issue is we serialize orderByAscending for ParseQueries, which gets passed along to the subscription request.

    var messagesQuery: PFQuery<Message> {
        return (Message.query()?
                .whereKey("roomName", equalTo: currentChatRoom!.name!)
                .order(byAscending: "createdAt")) as! PFQuery<Message>
    }

There are some issues if you have a ParseQuery that uses order by semantics (see #14).
I think we may need our own Parse encoding/decoding as it's done in the iOS version (https://github.com/ParsePlatform/ParseLiveQuery-iOS-OSX/blob/master/Sources/ParseLiveQuery/Internal/QueryEncoder.swift)

rogerhu added a commit to rogerhu/ParseLiveQuery-Android that referenced this issue Mar 22, 2017
rogerhu added a commit to rogerhu/ParseLiveQuery-Android that referenced this issue Mar 22, 2017
rogerhu added a commit to rogerhu/ParseLiveQuery-Android that referenced this issue Mar 23, 2017
rogerhu added a commit to rogerhu/ParseLiveQuery-Android that referenced this issue Mar 27, 2017
rogerhu added a commit to rogerhu/ParseLiveQuery-Android that referenced this issue Mar 27, 2017
rogerhu added a commit to rogerhu/ParseLiveQuery-Android that referenced this issue Mar 27, 2017
@rogerhu rogerhu closed this as completed Mar 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant