Build doctrine media entities