-
-
Notifications
You must be signed in to change notification settings - Fork 65
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
SQL: UPDATE not triggering schema default value #1814
Comments
@lvca Could the solution to this issue be adding a procedure call to |
The default values were meant to be set only at creation, so the record has an initial state. it should be possible to update the record changing the default initial value, so the default shouldn't be triggered at every update. What's your use case for this? |
I have records where a timestamp is set via |
If setting a default value on every update is a problem, then I guess it should at least happen for |
Asked to an AI the same question for Neo4j and MongoDB: they all set default values at creation, never on update. |
@lvca I see. Then please close my proposed pull request. Two follow questions arise for me then:
|
Another approach would be implementing the same behaviour of Postgres and Oracle on update. Something like: UPDATE ... CONTENT ... APPLY DEFAULTS In this case we could invoke the |
|
ArcadeDB Version:
ArcadeDB Server v24.10.1 (build ac46a0da6ebe4f5d337e50874f3d8a0d1bf092b1/1728751149872/main)
OS and JDK Version:
Running on Linux 6.2.0-26-generic - OpenJDK 64-Bit Server VM 17.0.12
Given a type having a
mandatory
,notnull
property with adefault
value, where a record is updated with the property in question being empty. Then thedefault
value is not triggered and thusnotnull
andmandatory
attributes trigger an error.Expected behavior
Update existing record with default value
Actual behavior
Steps to reproduce
The text was updated successfully, but these errors were encountered: