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

ImageDataObjectManager


Go to End
Reply


10 Posts   1683 Views

Avatar
yug

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/guy-watson-ss.internetrix.net/htdocs/sapphire/core/model/MySQLDatabase.php

Avatar
Ray

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