I've got an issue that I'm hoping someone can help with.
I've set up a DataExtension called BlogEntryExtension, which is applied to BlogEntry. I've also got a custom DataObject of class BlogCategory. So far so good.
$many_many = array('BlogCategories' => 'BlogCategory');
$belongs_many_many = array('BlogEntries' => 'BlogEntry');
The idea being that a BlogEntry can belong to many categories, and a category can contain multiple BlogEntries.
My issue is twofold. Firstly, I assumed that $this->owner->BlogCategories() from within BlogEntryExtension would return me the related BlogCategories. It doesn't - it returns ALL BlogCategories in the database.
Secondly, when I create a GridField Relation Editor for this relationship, it doesn't reflect the relationship, instead showing ALL BlogCategories again.
Has anyone encountered this before? Is many_many within DataExtensions not supported, or have I just misused something?
Thanks in advance.