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

WriteResponse does not return GeneratedKeys #502

Open
GaikwadPratik opened this issue Jun 12, 2022 · 0 comments
Open

WriteResponse does not return GeneratedKeys #502

GaikwadPratik opened this issue Jun 12, 2022 · 0 comments

Comments

@GaikwadPratik
Copy link

GaikwadPratik commented Jun 12, 2022

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)]
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