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

When INSERTing, use NULL when parent doesn't have specified field #252

Closed
wants to merge 1 commit into from
Closed

When INSERTing, use NULL when parent doesn't have specified field #252

wants to merge 1 commit into from

Conversation

MartijnVdS
Copy link

This is "adresseerbaarobjectnevenadres" has 3 fields, only one of which
will be present in the _parent object (ligplaatsstatus, standplaatsstatus
or verblijfplaatsstatus).

Because the database uses enum types for these values, and those enums
don't contain the empty string, inserting these records breaks.

By inserting NULLs instead, everything works the same as when using the
"COPY" statement.

This is a fix for #251

This is "adresseerbaarobjectnevenadres" has 3 fields, only one of which
will be present in the _parent object (ligplaatsstatus, standplaatsstatus
or verblijfplaatsstatus).

Because the database uses enum types for these values, and those enums
don't contain the empty string, inserting these records breaks.

By inserting NULLs instead, everything works the same as when using the
"COPY" statement.
@MartijnVdS MartijnVdS closed this by deleting the head repository Nov 27, 2022
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