I have a problem with Doctrine2 in Symfony2 and two relationed entities.
There is a user-entity that can (not must) have a usermeta-entity referenced which
I got the error message "spl_object_hash() expects parameter 1 to be object, null given in..." while trying the same thing. I tried to define a bidirectional One to One
relationship while the inversed value could be null
. This gave the error message. Taking away the inversed side of the relationship solved the problem.
It is a pity that Zero or One to One
relationships aren't supported.