Skip to content

Cope with foreign keys which are primary keys #41

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

Conversation

PeterJCLaw
Copy link
Contributor

@PeterJCLaw PeterJCLaw commented Jan 24, 2018

This removes the assumption that all models have a field called 'id' and ensures that we use the correct column name for each field.

This aims to fix #40.

This removes the assumption that all models have a field called
'id' and ensures that we use the correct column name for each field.

Fixes SectorLabs#40.
@PeterJCLaw PeterJCLaw force-pushed the fix-foreign-primary-key-on-conflict-do-nothing branch from d956b52 to 5f64e3a Compare January 24, 2018 18:46
@Photonios
Copy link
Member

Thanks for the contribution! This is definitely a change that should be merged. If you fix the failing test, then we're good to go from my end :-)

PeterJCLaw and others added 2 commits January 28, 2018 19:08
This works around SectorLabs#43 where foreign keys cannot be expressed as objects.
@Photonios Photonios merged commit 487ec1e into SectorLabs:master Jan 29, 2018
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.

ON CONFLICT DO NOTHING behaviour assumes existence of an 'id' field
2 participants