Skip to content

$reql_type$ not converted when the result is an array. #65

@oliverjanik

Description

@oliverjanik

This is a continuation from #39.

Using the latest stable 2.3.3 the second pass for JObject is performed when I do:

Table().Get().RunAtomAsync<JObject>(Conn)

I get correct display like this:

{
  "_createdBy": "oliver",
  "_storedAt": "2016-05-25T01:46:20.436+00:00",
  "id": "3ef139be-5f85-490d-b9bc-402c42945290",
  "test": "hello!"
}

However when I ask for an IEnumerable of JObjects the conversion is not performed:

Table().RunAtomAsync<IEnumerable<JObject>>(Conn)

This returns:

[
  {
    "_createdBy": "oliver",
    "_storedAt": {
      "$reql_type$": "TIME",
      "epoch_time": 1464140780.436,
      "timezone": "+00:00"
    },
    "id": "3ef139be-5f85-490d-b9bc-402c42945290",
    "test": "hello!"
  },
  ...
]

It looks like JObject is special cased somewhere. I'm wandering what happens If I ask for IDictionary<string, JObject>. I've tried plain object and the second pass conversion does not happen either.

I'm using RethinkDB fully dynamically. I don't have classes for my data. That's the main reason I picked RethinkDB. My queries are composed of ReqlExpr on the fly. Is this a use case you want to fully support in this driver? Sorry for creating headaches for you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions