Hey there folks,
I currently have a situation where I want a record in one table to point to another row in the same table. In other words this table must have a foreign key that points to its own primary key.
For example, we have a table called Units - a unit being a collection of lessons. We want a unit to have two new fields called
futureStudyUnit which point to other units in the collection.
I’ve tried various ways of getting working but nothing seems to be working at the moment.
I’m currently trying the following:
When I update a unit in the UI I should be able to alter the futureStudyUnit /
priorStudyUnit field so it links to another unit record.
Getting errors at the moment when I attempt to do this.
I can see the error is resulting because the request above is being made in the background and responding with 404.
Please provide any relevant information about your setup.
- Package Version:
- Express Version:
- Sequelize Version:
- Database Dialect: postgres
- Database Version:
- Project Name: