简体   繁体   English

TYPO3 Extbase双向1:n关系-返回null

[英]TYPO3 Extbase bidirectional 1:n relation - returns null

I have a 1:n relation between two model objects: MainAuthor and Book . 我在两个模型对象之间有一个1:n关系: MainAuthorBook I created my domain model with the Extension Builder and I need to get the MainAuthor in the Book class, just like this: TYPO3 Extbase bidirectional 1:n relation 我使用扩展构建器创建了域模型,需要在Book类中获取MainAuthor ,如下所示: TYPO3 Extbase双向1:n关系

I followed the instructions, but book->getMainAuthor() returns null. 我按照说明进行操作,但是book->getMainAuthor()返回null。 Is there something else I should do? 还有什么我应该做的吗?

  • Did you name your property correctly in Book (should be $mainAuthor )? 您是否在Book正确命名了属性(应该是$mainAuthor )?
  • Did you empty your caches? 您是否清空了缓存?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM