Let's say I have a Post entity, and a Comment entity. A comment can be approved or not by an admin (which is a flag in the db). The post entity has:
/**
* @ORM\OneToMany(targetEntity="Comment", mappedBy="post")
*/
protected $comments;
And I also want a second attribute which will look like:
/**
* @ORM\OneToMany(targetEntity="Comment", mappedBy="post")
*/
protected $approvedComments;
How is it possible to load only the approved comments here?