Doctrineで条件付きリレーション
We will write a behavior called RelationDql which allows you to add default query parts that are automatically added to your queries when you reference the specified relationships.
http://www.doctrine-project.org/blog/cookbook-recipe-relation-dql-behavior
ちょっと後で本気で見てみる。