Unable to Perform one to many join
Unable to Perform one to many join
Link to test case:
Debugger code (debug.datatables.net):
->join(
Mjoin::inst('workSites')
//->name('w')
->link('a.announcementID','announcementsToWorkSites.announcementID')
->link('workSites.workSiteID','announcementsToWorkSites.workSiteID')
->fields(
Field::inst('locationName')
)
)
Error messages shown:
DataTables warning: table id=announcementsListing - Join was performed on the field 'announcementID' which was not included in the Editor field list. The join field must be included as a regular field in the Editor instance.
Description of problem:
Trying to execute a one to many join for an announcement table using data tables, but it refuses to work. Any idea why?
Answers
Well, the error message says it clearly: You need to include the field "a.announcementID" in the field list of the Editor containing the MJoin. Please use Markdown as described below to highlight your code.