propelorm/PropelBundle — pull request #256 by pimpreneil (2013-11-28 16:29:43+00:00)
Title: Add inheritance support for fixtures with many to many relationship

In propel fixtures, when using many to many relationship on a child object (when using a propel inheritance behaviour), an error gets triggered because it cannot find the relation between the object and one of its parents relation.

The error is:

PHP Fatal error: Method name must be a string in /home/arnaud/www/primo/vendor/propel/propel-bundle/Propel/PropelBundle/DataFixtures/Loader/AbstractDataLoader.php on line 306

Here is a concrete use case (that triggers the error above):
Let's assume that the **CampaignSystem** class inherits from the **Campaign** class, and that the **Campaign** class is linked with a many to many relationship to the locale class through the crossRef **CampaignLocale** class.

The fixtures would look like this:

Locale:
locale_en_us:
locale: 'en_US'
locale_en_gb:
locale: 'fr_FR'

CampaignSystem:
campaign_1:
campaign_locales: [locale_en_us, locale_fr_FR]

So to sum the things up, the issue is that it is impossible for a child object to use its parents relationship.

The attached pull request fixes this issue.