Is throwing exception on null entity in proxy factory really necessary? #10962
Unanswered
erikkubica
asked this question in
Support Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I have a problem I struggle with and it's related to SQL filter that filters out draft entities when the user has no access to them.
Basically, this happens somehow on nested relationships when symfony/api-platform serializer tries to serialize deeply.
Example:
When the car is draft and I serialize user(2) without an owner, the car is null, with no errors and this is the expected behavior. However, when I add to serialize owner as well, this is thrown for User(2).owner.profile.car
orm/lib/Doctrine/ORM/Proxy/ProxyFactory.php
Line 229 in 62ed63b
Makes no sense if User(2).profile.car gets null when draft, why User(2).owner.profile.car does not.
Not sure if this is a doctrine issue or serializaiton issue, if serialization then if it's on api-platform side or symfony side.
Beta Was this translation helpful? Give feedback.
All reactions