Typo3: strange ghost column for 1:n relations

Today I spent hours trying to figure out why a relation wasn’t working. I have a table comments and a table fe_users, and a user can post a comment, therefore user:comment => 1:n. I had everything configured appropriately, yet $user->getComments() was always empty. Well, Typo3 is so stupid, it still needs the “ghost column” for relations, a column which is called as my relation objectstorage (“comments” in this case), but which contains essentially nothing. I thought that whatever that column contains doesn’t matter, but it turns out: I was wrong. If there is a null value in this column, it seems to fail to make a relation. The value must always be 0. Holy crap, that is so stupid.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.