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, Ed, biapar, Willr, Ingo, swaiba


Go to End

10 Posts   2374 Views


Community Member, 17 Posts

23 February 2011 at 4:46pm

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/


Community Member, 5 Posts

24 July 2011 at 11:21pm

Edited: 24/07/2011 11:22pm

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')";

Go to Top