Skip to content

Set internal default property value to undefined instead of null & add PostgreSQL uuid support - #855

Merged
dxg merged 1 commit into
masterfrom
postgres_uuid
Jan 12, 2022
Merged

dxg merged 1 commit into
masterfrom
postgres_uuid

Conversation

@dxg

@dxg dxg commented Jan 11, 2022

Copy link
Copy Markdown
Collaborator
  • Set internal default property value to undefined instead of null.

    • This will prevent null values being explicitly sent to the database when no value was assigned and instead result in the database setting the column to null, or generating a default value.
    • Properties with an internal value of undefined will still return null when accessed.
    • Setting a previously filled property to undefined will still set it to null in the DB.
    • No ORM tests were broken by this change, and as such, the impact of this should be limited ot a very small number of corner cases.
  • Add PostgreSQL uuid column support.

  • Allow specifying defaultExpression (eg. uuid_generate_v4() for PostgreSQL or uuid() for MySQL) to be executed by the database engine for generating default values.

@dxg
dxg force-pushed the postgres_uuid branch 2 times, most recently from cdc6eee to 43cb7b4 Compare January 12, 2022 10:17
This will prevent null values being explicitly sent to the database when no value was assigned and instead result in the database setting the column to null, or generating a default value.
Properties with an internal value of undefined will still return null when accessed.
Setting a previously filled property to undefined will still set it to null in the DB.
No ORM tests were broken by this change, and as such, the impact of this should be limited ot a very small number of corner cases.

Add PostgreSQL uuid column support.
Allow specifying defaultExpression (eg. uuid_generate_v4() for PostgreSQL or uuid() for MySQL) to be executed by the database engine for generating default values.
@dxg
dxg merged commit 4705473 into master Jan 12, 2022
@dxg
dxg deleted the postgres_uuid branch January 12, 2022 10:23
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