I have a Class like the following:
/** @Entity **/
class orgGroup{
//id and stuff...
/**
* @Column(type=\"string\")
**/
private $name
Be sure to initialize the orgGroups collection in the orgGroupType entity
/**
* @OneToMany(targetEntity="orgGroup", mappedBy="_orgGroupType")
*/
protected $orgGroups ;
public function __construct() {
$this->orgGroups = new ArrayCollection();
}
You might need to include the following in the Entity
use Doctrine\Common\Collections\Collection,
Doctrine\Common\Collections\ArrayCollection;