TYPO3 Extbase bidirectional 1:n relation - returns null

I have a 1:n relation between two model objects: MainAuthor and Book. 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

I followed the instructions, but book->getMainAuthor() returns null. Is there something else I should do?

Upvotes: 1

Views: 251

Answers (1)

taalas
taalas

Reputation: 406

  • Did you name your property correctly in Book (should be $mainAuthor)?
  • Did you empty your caches?

Upvotes: 0

Related Questions