我已经创建了一个名为"ad_gallery“的媒体类型,但在预处理过程中,我似乎不能把所有的条目都拉进去。
我在努力
\Drupal::entityQuery('media')->condition('type','ad_gallery')->execute();它说:
Drupal\Core\Entity\Query\QueryException:“type”未在Drupal\Core\Entity\Query\Sql\Tables->ensureEntityTable()中找到
是否有一种与节点不同的查询方式?
发布于 2019-01-08 12:41:52
您应该使用bundle而不是type。
像这样的东西会起作用的:
\Drupal::entityQuery('media')->condition('bundle', 'ad_gallery')->execute();https://stackoverflow.com/questions/54082520
复制相似问题