# Function get_many_to_many_relation_opts

- get_many_to_many_relation_opts(
  source: Table,
  viewname: string,
  cache: object,
  path: string[],
  ): any

  Get all relations where a many to many relation through a join table is possible

  #### Parameters

  - source: Table

    Top view table

  - viewname: string

    Top view

  - cache: object

    lookup cache for tables and views (can be null)

  - path: string[]

    path to the current table

  #### Returns any

  an array with the relation paths and the matching views

  - Defined in packages/saltcorn-data/plugin-helper.js:596