Is it somehow possible to create a merged table with more than two identifiers? In the wiki page it is possible to add more columns, for example "why" on this page: https://github.com/dresende/node-orm2/wiki/hasMany.
But i would like to have it like this: users_companies { user_id, company_id, permission_id } where permission_id is an id of the 3th table.
I know i can do this by creating a custom function which fetch the permission in the user/company model on request, but i would rather have the 'cleaner' version.
Hi guys,
Is it somehow possible to create a merged table with more than two identifiers? In the wiki page it is possible to add more columns, for example "why" on this page: https://github.com/dresende/node-orm2/wiki/hasMany.
But i would like to have it like this: users_companies
{ user_id, company_id, permission_id }
wherepermission_id
is an id of the 3th table.I know i can do this by creating a custom function which fetch the permission in the user/company model on request, but i would rather have the 'cleaner' version.
Thanks in advance!