gpt4 book ai didi

orm - 检查 Doctrine 关系是否正确

转载 作者:行者123 更新时间:2023-12-05 01:20:09 25 4
gpt4 key购买 nike

是否可以检查模型之间的关系是否正确?

我正在寻找 cli 命令或类似显示错误关系的 Symfony2 分析器之类的东西。

最佳答案

有一个内置命令可以验证映射文件是否正确并与数据库同步:

./bin/doctrine help orm:validate-schema

'Validate that the mapping files are correct and in sync with the database.'

在 symfony2 doctrine bundle 中存在两个命令:

doctrine:schema:validate

The doctrine:schema:validate checks the current mappings for valid forward and reverse mappings.

doctrine:mapping:info

The doctrine:mapping:info shows basic information about which entities exist and possibly if their mapping information contains errors or not.

关于orm - 检查 Doctrine 关系是否正确,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33167638/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com