Skip to content

Wrong OptArg serialisation after OrderBy #163

Open
@oliverjanik

Description

Version Information

| .NET Full Framework? | 4.8 |
| RethinkDB Server | 2.3.6 |

Hi I have a very simple indexed orderby:

R.Db("db").Table("table").OrderBy().OptArg(R.Desc("lastName")).Limit(100)

This gives me:

RethinkDb.Driver.ReqlServerCompileError
Expected a TermType as a NUMBER but found STRING.

It produces this raw string:

$reql_reqlraw$[71,[[41,[[15,[[14,["db"]],"table"]]],{"index":["DESC",["lastName"]]}],100]]

Notice the "DESC" in the raw string? Should be 74. I believe OptArgs have a serialisation bug where they use globally defined JsonConvert.Settings accidentally and therefore the enum is serialised as string.

Any workarounds?

Activity

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

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions