GeneratorBundle
GeneratorBundle copied to clipboard
Missing method when adding a `ManyToOne` association
When I add a ManyToOne association mapping to the Category, class between Category and Post classes, I expect the generator to add also these methods :
/**
* Add post
*
* @param \AppBundle\Entity\Post $post
*
* @return Post
*/
public function addPost(\AppBundle\Entity\Post $post)
{
$this->posts[] = $post;
return $this;
}
/**
* Remove post
*
* @param \AppBundle\Entity\Post $post
*/
public function removePost(\AppBundle\Entity\Post $post)
{
$this->posts->removeElement($post);
}
Note, that I expect the same for the inverse (owned) side.