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

Bug: update merge should not check required fields #3981

Closed
2 tasks done
liusong1111 opened this issue May 4, 2024 · 1 comment · Fixed by #4040
Closed
2 tasks done

Bug: update merge should not check required fields #3981

liusong1111 opened this issue May 4, 2024 · 1 comment · Fixed by #4040
Assignees
Labels
bug Something isn't working topic:surrealql This is related to the SurrealQL query language

Comments

@liusong1111
Copy link

liusong1111 commented May 4, 2024

Describe the bug

update tbl:id merge {} report error says field required but found NONE.

Steps to reproduce

DEFINE TABLE user SCHEMAFULL;
DEFINE FIELD name ON TABLE user TYPE string;
DEFINE FIELD nickname ON TABLE user TYPE opiton<string>;

CREATE user:sliu CONTENT { name: "sliu" };

UPDATE user:sliu MERGE {};

the last UPDATE statement report error:

'Found NONE for field `name`, with record `user:sliu`, but expected a string'

Expected behaviour

UPDATE user:sliu MERGE {};

should execute successfully and update no fields.

SurrealDB version

v1.4.2

Contact Details

No response

Is there an existing issue for this?

  • I have searched the existing issues

Code of Conduct

  • I agree to follow this project's Code of Conduct
@liusong1111 liusong1111 added bug Something isn't working triage This issue is new labels May 4, 2024
@Dhghomon
Copy link
Contributor

Thanks for the issue! It should indeed execute successfully and update nothing.

@phughk phughk added topic:surrealql This is related to the SurrealQL query language and removed triage This issue is new labels May 13, 2024
@tobiemh tobiemh assigned tobiemh and unassigned DelSkayn May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working topic:surrealql This is related to the SurrealQL query language
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants