FolderResource and AccessLinkResource.AccessLink belongs to an Folder. And Folderhave many AccessLinks.AccessLinkResource which show and create the records using the folder_id.AccessLinkResource table using the folder_id. FolderResource:modifyQueryUsing in AccessLinktable: