mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
Initialized ArrayCollection is null #6434
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @FabianKoestring on GitHub (Mar 27, 2020).
Support Question
Hey there,
iam facing following crazy behavior. I have 2 Entities. When i try to access an attribute from the one entity i will get
nullbut this attribute is defined and initialized as anArrayCollection. I expected a filled or emptyArrayCollectionbut notnull. What may be the problem?First Entity
Second Entity
Test
@greg0ire commented on GitHub (Mar 28, 2020):
Do you instantiate
$categoryyourself or do you get it from Doctrine? Do you know how to validate your mapping and have you tried doing so?@FabianKoestring commented on GitHub (Mar 28, 2020):
Sry. Gonna close this. It happend because of a missing join in a native query with resultset Mapping which selects the Same object.
My bad!