belongsToMany() with Adonisjs convention I get an error stating that the table
profile_role doesn’t exist.
select roles.*, profile_role.role_id as pivot_role_id, profile_role.profile_id as pivot_profile_id from roles inner join profile_role on roles.id = profile_role.role_id where profile_role.profile_id in (1) - ER_NO_SUCH_TABLE: Table adonis_development.profile_role'doesn't exist
This error is correct as this table doesn’t exist in my database, however Adonis generated my table name as
profile_roles in a migration which is the correct convention, but for some reason
belongsToMany() seems to be looking for a table named
Before I file an issue with Adonis or Knexjs I wanted make sure I’m not doing anything wrong here.
I’m aware that I can specify a pivot table and using that in the interim.