how to call chile table function in doctrine 2 , zf1

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

how to call chile table function in doctrine 2 , zf1

srikanth reddy
This post has NOT been accepted by the mailing list yet.
class parent{
/**
@Id GeneratedValue
*/
private $id;
 /**  @var Collection
         * @OneToMany(targetEntity="Application_Entity_Area", mappedBy="Application_Entity_City", cascade={"all"}) */

private $childs;

public function __constructor(){
$this->childs = new ArrayCollection();
}

........
...
...
}

Class Child{
/**
@Id GeneratedValue
*/
private $id;
/**
     * @ManyToOne(targetEntity="Application_Entity_City", inversedBy="Application_Entity_Area")
     * @JoinColumn(name="city_id", referencedColumnName="city_id", nullable=FALSE)
     */
private $parent;

}

here my questions is....

how to get list of childs from parent entity ( zf1 , doctrine2 )?.

am getting getParentName(); getParentAddress();
but am not getting getChilds();

Please any one can answer.