I can't get getManyManyComponents() working :(
I have extend a page of type product with
public static $many_many = array( 'Images' => 'Image' );
So now I have a table called Product_Images with the comlumns ProductID and ImageID in my database.
Within the CMS I can attach images to my ProductPage and everything is working fine.
Now I want to access all images of a Product from a Shortcode.
(it has to come from a shortcode and not within the template itself)
I can get the current ProductID with Director::...... or from an argument of the shortcode.
And now I want to retrieve my images related to this ProductID.
$ProductImages = new Product_Images; $images = $ProductImages->getManyManyComponents('Images', array('Product_Images.ProductID' => $intPageID));
What am I doing wrong?