0

Version

Strapi:v4.10.5 npm:v6.14.8

Content

Question about Strapi.

I created a many-to-many relationship using the following two collections:

  • employee_career_histories
  • employee_statuses

When I created this relationship, an intermediate table called "employee_career_histories_employee_statuses_links" was automatically generated. However, there is no corresponding collection for this intermediate table, so there are no API endpoints available.

The data in this intermediate table consists of foreign keys, so there is no data in the two original tables mentioned above.

Please provide guidance on how to retrieve data from the intermediate table using the API or how to create a custom endpoint.

What I've tried

  • I attempted to retrieve data using the populate feature, but it did not work.
  • I found information about creating custom endpoints, but I couldn't find the "routes.json" file in my Strapi project.
kazuki
  • 1
  • 1
  • `await strapi.db.connection(…)` is pathway to knex https://knexjs.org with it you can reach internals in custom controllers and services – antokhio Jun 10 '23 at 09:19
  • Thank you for commnet.But I could see the purpose table in Firefox. When I see in Chrome developer tool, I could not see it. My problem was solved. – kazuki Jun 12 '23 at 08:54

0 Answers0