Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

DataObjectManager Module

Discuss the DataObjectManager module, and the related ImageGallery module.

Moderators: martimiz, UncleCheese, Sean, biapar, Willr, Ingo, swaiba, simon_w



10 Posts   1624 Views


23 February 2011 at 4:46pm Community Member, 17 Posts

I changed that but still get this

[User Error] Couldn't run query: SELECT "BannerImage"."ClassName", "BannerImage"."Created", "BannerImage"."LastEdited", "BannerImage"."Title", "BannerImage"."URL", "BannerImage"."SortOrder", "BannerImage"."BannerImageID", "BannerImage"."ID", CASE WHEN "BannerImage"."ClassName" IS NOT NULL THEN "BannerImage"."ClassName" ELSE 'BannerImage' END AS "RecordClassName", IF(`Page_BannerImages`.`PageID` IS NULL, '0', '1') AS Checked FROM "BannerImage" LEFT JOIN `Page_BannerImages` ON (`BannerImage`.`ID` = `BannerImageID` AND `Page_BannerImages`.`PageID` = '2') GROUP BY "BannerImage"."ClassName", "BannerImage"."Created", "BannerImage"."LastEdited", "BannerImage"."Title", "BannerImage"."URL", "BannerImage"."SortOrder", "BannerImage"."BannerImageID", "BannerImage"."ID", CASE WHEN "BannerImage"."ClassName" IS NOT NULL THEN "BannerImage"."ClassName" ELSE 'BannerImage' END ORDER BY `Page_BannerImages`.SortOrder ASC LIMIT 0, 10 Column 'BannerImageID' in on clause is ambiguous
GET /admin/

Line 525 in /data/www/


24 July 2011 at 11:21pm (Last edited: 24 July 2011 11:22pm), Community Member, 5 Posts

In case anyone's interested in this problem, editing line 63 of the current version of ManyManyDataObjectManager (the construct function) to include the $manyManyTable solves the ambiguity.

$this->sourceJoin .= " LEFT JOIN \"$manyManyTable\" ON (\"$source\".\"ID\" = \"$manyManyTable\".\"{$sourceField}ID\" AND \"$manyManyTable\".\"{$this->manyManyParentClass}ID\" = '$parentID')";