-
-
Notifications
You must be signed in to change notification settings - Fork 508
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Don't generate proxy classes for embedded documents #1628
Conversation
@@ -62,7 +63,9 @@ protected function execute(Console\Input\InputInterface $input, Console\Output\O | |||
{ | |||
$dm = $this->getHelper('documentManager')->getDocumentManager(); | |||
|
|||
$metadatas = $dm->getMetadataFactory()->getAllMetadata(); | |||
$metadatas = array_filter($dm->getMetadataFactory()->getAllMetadata(), function (ClassMetadata $classMetadata) { | |||
return !$classMetadata->isEmbeddedDocument; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should also exclude $classMetadata->isQueryResultDocument
while we're here (and maybe $classMetadata->isMappedSuperclass
too)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll just change the check to isDocument
, that's simpler. I'll have to think about isQueryResultDocument
- there may be the need for proxies there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated. Turns out we don't have isDocument
, so I can't test against that. We also don't need to generate proxies for query result documents, so I'll add that when merging down to master. 👍
I wouldn't worry too much here, it's only commands ;) |
fd6112f
to
7e96bba
Compare
Fixes #1627.
Not sure about tests here, but it fixes the issue.