Skip to content

fix: call setDefaultValues also on update#1830

Closed
gramian wants to merge 0 commit into
ArcadeData:mainfrom
gramian:main
Closed

fix: call setDefaultValues also on update#1830
gramian wants to merge 0 commit into
ArcadeData:mainfrom
gramian:main

Conversation

@gramian
Copy link
Copy Markdown
Collaborator

@gramian gramian commented Nov 20, 2024

What does this PR do?

This change fixes the behavior that default property values are not set on record updates. Now for mandatory properties the default is set anew on updates given the propertiy is null.

Motivation

Originally the problem arose when property fields with timestamps that were created as default values caused exceptions when the associated records were updated and the timestamp field was absent in the updated record (as it was expected to be set with the default value).

Related issues

#1814

Additional Notes

Could there be any corner cases where this causes problems?

Checklist

  • I have run the build using mvn clean package command
  • My unit tests cover both failure and success scenarios

@gramian
Copy link
Copy Markdown
Collaborator Author

gramian commented Nov 20, 2024

I modified the change so only mandatory properties are set to defaults on updates, see #1814 (comment) .

@codacy-production
Copy link
Copy Markdown

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.00%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (f44ecba) 68799 43738 63.57%
Head commit (f44ecba) 68799 (+0) 43738 (+0) 63.57% (+0.00%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#1830) 0 0 ∅ (not applicable)

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

mergify Bot added a commit that referenced this pull request May 13, 2026
…udio [skip ci]

Bumps [@protobufjs/utf8](https://github.com/dcodeIO/protobuf.js) from 1.1.0 to 1.1.1.
Release notes

*Sourced from [@​protobufjs/utf8's releases](https://github.com/dcodeIO/protobuf.js/releases).*

> protobufjs-cli: v1.1.1
> ----------------------
>
> [1.1.1](protobufjs/protobuf.js@protobufjs-cli-v1.1.0...protobufjs-cli-v1.1.1) (2023-02-02)
> ---------------------------------------------------------------------------------------------------------------------
>
> ### Bug Fixes
>
> * **cli:** fix relative path to Google pb files ([#1859](https://redirect.github.com/protobufjs/protobuf.js/issues/1859)) ([e42eea4](protobufjs/protobuf.js@e42eea4))


Commits

* [`644d588`](protobufjs/protobuf.js@644d588) chore: release master ([#1865](https://redirect.github.com/dcodeIO/protobuf.js/issues/1865))
* [`e42eea4`](protobufjs/protobuf.js@e42eea4) fix(cli): fix relative path to Google pb files ([#1859](https://redirect.github.com/dcodeIO/protobuf.js/issues/1859))
* [`dce9a2e`](protobufjs/protobuf.js@dce9a2e) fix: use bundled filename to fix common pb includes ([#1860](https://redirect.github.com/dcodeIO/protobuf.js/issues/1860))
* [`64e8936`](protobufjs/protobuf.js@64e8936) fix: use ES5 style function syntax ([#1830](https://redirect.github.com/dcodeIO/protobuf.js/issues/1830))
* [`4489fa7`](protobufjs/protobuf.js@4489fa7) Revert "fix: error should be thrown ([#1817](https://redirect.github.com/dcodeIO/protobuf.js/issues/1817))" ([#1864](https://redirect.github.com/dcodeIO/protobuf.js/issues/1864))
* See full diff in [compare view](protobufjs/protobuf.js@protobufjs-cli-v1.1.0...protobufjs-cli-v1.1.1)
  
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility\_score?dependency-name=@protobufjs/utf8&package-manager=npm\_and\_yarn&previous-version=1.1.0&new-version=1.1.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
Dependabot commands and options
  
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot show  ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/ArcadeData/arcadedb/network/alerts).
mergify Bot added a commit that referenced this pull request May 13, 2026
… [skip ci]

Bumps [@protobufjs/utf8](https://github.com/dcodeIO/protobuf.js) from 1.1.0 to 1.1.1.
Release notes

*Sourced from [@​protobufjs/utf8's releases](https://github.com/dcodeIO/protobuf.js/releases).*

> protobufjs-cli: v1.1.1
> ----------------------
>
> [1.1.1](protobufjs/protobuf.js@protobufjs-cli-v1.1.0...protobufjs-cli-v1.1.1) (2023-02-02)
> ---------------------------------------------------------------------------------------------------------------------
>
> ### Bug Fixes
>
> * **cli:** fix relative path to Google pb files ([#1859](https://redirect.github.com/protobufjs/protobuf.js/issues/1859)) ([e42eea4](protobufjs/protobuf.js@e42eea4))


Commits

* [`644d588`](protobufjs/protobuf.js@644d588) chore: release master ([#1865](https://redirect.github.com/dcodeIO/protobuf.js/issues/1865))
* [`e42eea4`](protobufjs/protobuf.js@e42eea4) fix(cli): fix relative path to Google pb files ([#1859](https://redirect.github.com/dcodeIO/protobuf.js/issues/1859))
* [`dce9a2e`](protobufjs/protobuf.js@dce9a2e) fix: use bundled filename to fix common pb includes ([#1860](https://redirect.github.com/dcodeIO/protobuf.js/issues/1860))
* [`64e8936`](protobufjs/protobuf.js@64e8936) fix: use ES5 style function syntax ([#1830](https://redirect.github.com/dcodeIO/protobuf.js/issues/1830))
* [`4489fa7`](protobufjs/protobuf.js@4489fa7) Revert "fix: error should be thrown ([#1817](https://redirect.github.com/dcodeIO/protobuf.js/issues/1817))" ([#1864](https://redirect.github.com/dcodeIO/protobuf.js/issues/1864))
* See full diff in [compare view](protobufjs/protobuf.js@protobufjs-cli-v1.1.0...protobufjs-cli-v1.1.1)
  
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility\_score?dependency-name=@protobufjs/utf8&package-manager=npm\_and\_yarn&previous-version=1.1.0&new-version=1.1.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
Dependabot commands and options
  
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot show  ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/ArcadeData/arcadedb/network/alerts).
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

Successfully merging this pull request may close these issues.

1 participant