admin管理员组文章数量:1297014
Does anyone have any information on how to turn on softdeleteable for MongoDB Documents in Symfony?
I see the classes are present in the library, and I tried to turn them on, but everything immediately hard deletes from database.
Does anyone have any direction or dev roadmap on when this feature is expected to work in mongodb/ODM?
doctrine_mongodb:
auto_generate_proxy_classes: true
auto_generate_hydrator_classes: true
connections:
default:
server: '%env(resolve:MONGODB_URL)%'
options: {}
default_database: '%env(resolve:MONGODB_DB)%'
document_managers:
default:
auto_mapping: true
mappings:
App:
dir: '%kernel.project_dir%/src/Document'
prefix: 'App\Document'
loggable:
type: attribute # or annotation
alias: GedmoLoggable
prefix: Gedmo\Loggable\Document
dir: "%kernel.project_dir%/vendor/gedmo/doctrine-extensions/src/Loggable/Document"
is_bundle: false
filters:
softdeleteable:
class: Gedmo\SoftDeleteable\Filter\ODM\SoftDeleteableFilter
enabled: true
# stof_doctrine_extensions.yaml
stof_doctrine_extensions:
default_locale: en_US
mongodb:
default:
timestampable: true
blameable: true
softdeleteable: true
loggable: true
Added to Document with the deletedAt field.
#[Gedmo\SoftDeleteable(fieldName: 'deletedAt', timeAware: false, hardDelete: true)]
本文标签: odmSoftDeleteable documents in Doctrine MongoDB in SymfonyStack Overflow
版权声明:本文标题:odm - SoftDeleteable documents in Doctrine MongoDB in Symfony - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741646814a2390232.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论