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

NonNull Violation and calling nextval() on sequence_name when primary key is uuid #805

Open
Amnesthesia opened this issue Jul 26, 2023 · 0 comments

Comments

@Amnesthesia
Copy link

When primary key is of type uuid, we're getting a non-null violation for column ID (using postgres) especially when using on_duplicate_key_update, but only when some records in the array have an ID.

We've worked around this by splitting our imports so that it imports records that need to be updated separately from records that need to be imported, and it works. When some records have IDs and others dont, we get non-null violations on ID columns. This doesn't normally happen if ID is an integer — and why sequence_name is set on the model when there's no sequence for this primary key, I have no idea.

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

No branches or pull requests

1 participant