SELECT * FROM Comment k INNER JOIN Entity e ON k.entity=e.id LEFT JOIN Play p ON k.entity=p.id LEFT JOIN Concert c ON k.entity=c.id