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

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

Merged
merged 1 commit into from
Jan 12, 2022

Conversation

dxg
Copy link
Collaborator

@dxg dxg commented Jan 11, 2022

  • 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