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

Support foreign key that points to a non-primary (unique) key #835

Open
nik2208 opened this issue Jan 9, 2022 · 3 comments
Open

Support foreign key that points to a non-primary (unique) key #835

nik2208 opened this issue Jan 9, 2022 · 3 comments
Assignees

Comments

@nik2208
Copy link
Contributor

nik2208 commented Jan 9, 2022

I have a questions table and an answers table. the answers table has a foreignKey field named questionUuid related to the field uuid (not related to the id field) of the question table. According to the docs, I supposed the join request would have been records/questions?join=answers but it actually doesn't work. Am I missing something?

If I filter the answers table per questionUuid, it applies correctly and I get only the answers related to their question.

@mevdschee
Copy link
Owner

So, you have a foreign key that points to a non-primary key, am I correct? I never took that situation into account.

@mevdschee mevdschee self-assigned this Jan 10, 2022
@mevdschee mevdschee changed the title JOIN HasMany related not binding child fields Support foreign key that points to a non-primary (unique) key Jan 10, 2022
@nik2208
Copy link
Contributor Author

nik2208 commented Jan 10, 2022

Exactly.. since nosql databases use uuid as a standard, I'm setting things up to make it support (eventually) hybridisation with ease.

@nik2208
Copy link
Contributor Author

nik2208 commented Feb 17, 2022

now that I practiced with simple things, show me the path to work this out ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants