-
Notifications
You must be signed in to change notification settings - Fork 11
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
fix: null as default value #845
Conversation
test/compliance/INSERT.test.js
Outdated
const { 'basic.literals.defaults': entity } = cds.db.entities | ||
await cds.run(INSERT.into(entity).entries({ID: 1})) | ||
const result = await cds.run(SELECT.from(entity, 1)) | ||
assert.deepEqual(result, { ID: 1, boolean: false, integer: 0, nulls: null, string: ''}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also like assert
, but I do think it would be best to make it work with expect
for overall consistency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we do use assert
already quite heavily, don't we? I changed from expect
to assert
as we want to go towards assert
in the future?
🤖 I have created a release *beep* *boop* --- <details><summary>db-service: 1.14.0</summary> ## [1.14.0](db-service-v1.13.0...db-service-v1.14.0) (2024-10-15) ### Added * assoc-like calc elements after exists predicate ([#831](#831)) ([05f7d75](05f7d75)) ### Fixed * Improved behavioral consistency between the database services ([#837](#837)) ([b6f7187](b6f7187)) * Treat assoc-like calculated elements as unmanaged assocs ([#830](#830)) ([cbe0df7](cbe0df7)) </details> <details><summary>sqlite: 1.7.4</summary> ## [1.7.4](sqlite-v1.7.3...sqlite-v1.7.4) (2024-10-15) ### Fixed * Improved behavioral consistency between the database services ([#837](#837)) ([b6f7187](b6f7187)) </details> <details><summary>postgres: 1.10.1</summary> ## [1.10.1](postgres-v1.10.0...postgres-v1.10.1) (2024-10-15) ### Fixed * add cds schema for postgres build plugin ([#843](#843)) ([6306d5c](6306d5c)) * Improved behavioral consistency between the database services ([#837](#837)) ([b6f7187](b6f7187)) * null as default value ([#845](#845)) ([0041ec0](0041ec0)) </details> <details><summary>hana: 1.3.1</summary> ## [1.3.1](hana-v1.3.0...hana-v1.3.1) (2024-10-15) ### Fixed * combination of groupby and orderby ([#825](#825)) ([10e0534](10e0534)) * Improved behavioral consistency between the database services ([#837](#837)) ([b6f7187](b6f7187)) * list optimization for `Buffer` values ([#817](#817)) ([3e60de2](3e60de2)) * null as default value ([#845](#845)) ([0041ec0](0041ec0)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: Johannes Vogel <johannes.vogel@sap.com>
even though modeling is weird as the db default is anyway null, our implementation should go along with it.
closes #773