Skip to content

Nested object returns as null if first property is null #7

@hannupekka

Description

@hannupekka

Given the query
const query = knex.select(['table.col_a AS _nested_colA','table.col_b AS _nested_colB']);

am I right to assume that with table.col_a as null and table.col_b as foo I should be getting back

{
  nested: {
    colA: null,
    colB: 'foo'
  }
}

However, I get

{
  nested: null
}

Is this how it should be working or might this be a bug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions