You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hugo Persson edited this page Dec 3, 2020
·
1 revision
The general structure of relationships is defining a get function in the model that returns what you expect, for example if you have folder model that has many files related to it the folder model would have this get function:
publicgetfiles(): Promise<Array<File>>{returnthis.oneToMany<File>(File,"id","folderId");}// And if you have a Folder object and want to get all files you useawaitfolder.files;