Skip to content
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

Wrong OptArg serialisation after OrderBy #163

Open
oliverjanik opened this issue Oct 21, 2022 · 0 comments
Open

Wrong OptArg serialisation after OrderBy #163

oliverjanik opened this issue Oct 21, 2022 · 0 comments

Comments

@oliverjanik
Copy link

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?

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