3060 Posts in 864 Topics by 646 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 990 Views |
-
ManyManyComplexTableField produced field list is ambiguous error

2 June 2010 at 9:17pm
Hi folks,
I have got a wierd issue with a many_many relation. I have 2 Pages a ProjectHolder and a ServicePage. The ProjectHolder page has many_many relation the ServicePage. When I add the field to the CMSFields it will come up with a nice annoying error.
...... CASE WHEN "SiteTree"."ClassName" IS NOT NULL THEN "SiteTree"."ClassName" ELSE 'SiteTree' END ORDER BY "Sort" LIMIT 10 OFFSET 0 Column 'ProjectHolderID' in field list is ambiguous
here is my Projectholder
class ProjectHolder extends Page {
public static $many_many = array(
'Services'=>'ServicePage'
);
function getCMSFields() {
$fields = parent::getCMSFields();
$tablefield = new ManyManyComplexTableField(
$this,
'Services',
'ServicePage',
null,
'getCMSFields_forPopup'
);
$fields->addFieldToTab("Root.Content.Services",$tablefield);
return $fields;
}
}
and here is my ServicePageclass ServicePage extends Page {
static $belongs_many_many = array(
'ProjectHolders' => 'ProjectHolder'
);
}Does anyone have an idea as to what the issue could be ? Thx
| 990 Views | ||
|
Page:
1
|
Go to Top |

