Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$foreignCollection declarated but never user #901

Closed
romantymoshyk opened this issue Jul 31, 2014 · 0 comments
Closed

$foreignCollection declarated but never user #901

romantymoshyk opened this issue Jul 31, 2014 · 0 comments

Comments

@romantymoshyk
Copy link

In next generated piece of code $foreignCollection setted, but not used

/**
 * @param   Property $property The property object to add.
 */
protected function doAddProperty(Property $property)
{
    // set the back reference to this object directly as using provided method either results
    // in endless loop or in multiple relations
    if (!$property->getCampaignTypes()->contains($this)) { $propertyCampaignType = new PropertyCampaignType();
        $propertyCampaignType->setProperty($property);
        $this->addPropertyCampaignType($propertyCampaignType);

        $foreignCollection = $property->getCampaignTypes();
        $foreignCollection[] = $this;
    }
}
nibsirahsieu referenced this issue Jan 29, 2015
Provided tests for testing if all references are set for crossreferences before saving
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant