What if the foreign key reference was not an parent-child relationship, instead was a one-to-many relationship between 2 first class entities? For example, Company (1) related to Contacts (many), but they should be accessed as /v1/companies/:id and /v1/contacts/:id.
What if there was a unique constraint on the foreign key reference, so that the relationship becomes a one-to-one relationship? What does the auto-generated REST endpoint look like?
How does it handle join-tables which implement many-to-many relationships? Does it generate the REST end point for the join-table instead?
How does it handle different subcollection semantics? In other words, sometimes we want to treat the entire subcollection as an atomic entity. Other times, we want to create, delete and update individual elements of the subcollection.
How does it support SQL query optimizations?