简体   繁体   English

主义ODM Mongo DB Hydrator

[英]Doctrine ODM Mongo DB Hydrator

I'm trying to handle hydrator of doctrine for avoiding this issue: 我正在尝试避免发生该问题,以免发生此问题:

The \\"MongoDBODMProxies\\__CG__\\Foo\\MyBundle\\Document\\MyDocument\\" document with identifier \\"53aae4fe8b589793538b456c\\" could not be found." 找不到标识符为“ 53aae4fe8b589793538b456c”的\\“ MongoDBODMProxies \\ __ CG __ \\ Foo \\ MyBundle \\ Document \\ MyDocument \\”文档。

I tried to use orphanRemoval=true on my ReferenceOne but it still doesn't work. 我尝试在ReferenceOne上使用orphanRemoval=true ,但仍然无法正常工作。

Here is my unidirectional structure to avoid complex/redondent data: 这是我的单向结构,以避免出现复杂/重复的数据:

DocB ==> $fieldDocA ==> ReferenceOne(targetDocument="DocA") ==> DocA DocB ==> $ fieldDocA ==> ReferenceOne(targetDocument =“ DocA”)==> DocA

When I delete DocA, I want that Symfony delete automatically all documents where DocB contains $fieldDocA === DocA but I found nothing to do it properly on internet. 当我删除DocA时,我希望Symfony自动删除DocB包含$fieldDocA === DocA所有文档,但是我在互联网上找不到正确的方法。

Thanks in advance for your help ! 在此先感谢您的帮助 !

I believe your question resembles a feature request we rejected due to already existing solutions: 我相信您的问题类似于由于现有解决方案而被拒绝功能请求

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM