即使我能够通过findByUid()访问特定记录,我也无法找到所有()返回任何内容.
我已经注意到(并试图解决/设置)typoscript解决方案和记录存储页面错误,但没有任何成功.
为了您的方便,我正在使用TYPO3(当前版本)中的扩展构建器生成的虚拟扩展代码.我已经通过TYPO3配置ui手动添加数据进行了测试.
任何帮助将非常感激.
一切顺利,并提前感谢
马里奥
在做新东西之前,我希望我的scheduler-Task从数据库中删除所有条目,execute-function看起来像这样:
public function execute() {
$objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\CMS\Extbase\Object\ObjectManager');
$jobRepository = $objectManager->get('\TYPO3\MyExtension\Domain\Repository\JobRepository');
//clear DB
$jobRepository->removeAll();
(...)//insert new entries to DB
$objectManager->get('TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface')->persistAll();
return true;
}
Run Code Online (Sandbox Code Playgroud)
将新条目插入数据库工作正常,但清除数据库根本不起作用.我究竟做错了什么?