Doctrine 2 - ORM

better way to detect class parents