Skip to content

WriteResponse does not return GeneratedKeysΒ #502

@GaikwadPratik

Description

@GaikwadPratik

Describe the bug
I am running below query

alert := dbEntities.Alert{
		Acknowledged:          false,
		AcknowledgedTimestamp: nil,
		AutoAcknowledged:      false,
		Class:                 alertClass,
		Count:                 1,
		Level:                 alertLevel,
		Message:               message,
		Ref:                   ref,
		Timestamp:             nil,
		Type:                  alertType,
		RuleId:                ruleId,
	}
res, err := r.Table(hConstant.TableAlert).Insert(alert).RunWrite(rethinkHelper.RethinkSession)

There is no error. In the res, it says inserted is 1 but GeneratedKeys slice is empty

To Reproduce
Steps to reproduce the behavior:

  1. Create Database.
  2. Create Table
  3. run above query
  4. Check the response object

Expected behavior
GeneratedKeys should have more than 0 value, specially generated id for inserted record

Screenshots
image (1)

System info

  • OS: [Ubuntu 18.04.6 LTS]
  • RethinkDB Version: [2.4.2~0bionic (GCC 7.5.0)]

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