Automatically map ResultSetMetaData for native queries

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Minor - P4
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The resultset logic does not know how to map fields, and relies on an explicit project to perform the mapping:

      { $project: { author: 1, _id: 0, vintage: 1, publishYear: 1, comment: 1, title: 1 } }

      For example, the metadata could be dynamically created as results are read. (If the first record has fields A and C, they would be placed in metadata under 0 and 1. Then, if an ensuing record with B is read, this would be placed in metadata under 2.)

      Another possibility is to dynamically generate the $project from the entity class.

      All project stages would need to be removed from tests.

            Assignee:
            Nathan Xu
            Reporter:
            Maxim Katcharov
            None
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: