php-crud-api
php-crud-api copied to clipboard
Support foreign key that points to a non-primary (unique) key
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.
So, you have a foreign key that points to a non-primary key, am I correct? I never took that situation into account.
Exactly.. since nosql databases use uuid as a standard, I'm setting things up to make it support (eventually) hybridisation with ease.
now that I practiced with simple things, show me the path to work this out ;)