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

Allow primary key to be specified for relationship #333

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

loren
Copy link
Contributor

@loren loren commented Aug 24, 2022

Needed for through tables that have no primary key defined

Loren Siebert and others added 3 commits August 23, 2022 14:40
- When `through_tables` are explicitly specified, the table gets added to the tree when it shouldn't.
Workaround for Prisma-managed implicit through tables that have no primary key defined

- prisma/prisma#11110
@toluaina
Copy link
Owner

toluaina commented Sep 2, 2022

Thanks for opening this PR and sorry for the delay.
Can I ask what is the use case for this?
Also remove through_node has a side effect as this is required un sync.py.
I believe one of the tests should fail

@loren
Copy link
Contributor Author

loren commented Sep 6, 2022

My use case here is to work around a situation where my through table does not have an official primary key (and currently cannot have a primary key), but it does have a composite unique key. I want to be able to specify the primary key for the relationship the same way I can for nodes and children.

Thank you for making pgsync and continuing to maintain it!

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.

None yet

2 participants