模糊教程 - Doctrine入门

问题描述 投票:0回答:1

我正在尝试完成本教程。

http://doctrine-orm.readthedocs.org/en/latest/tutorials/getting-started.html

但是我必须陷入必须创建架构的地步。

php vendor/bin/doctrine orm:schema-tool:create

总是得到:

没有要处理的元数据类。

我尝试了以下帖子提出的解决方案是徒劳的:

Doctrine2 - No Metadata Classes to process

Doctrine2: Getting Started Tutorial "No Metadata Classes to process"

有什么建议 ?我被困在这里大约三个小时: - /

php doctrine-orm
1个回答
0
投票

使用XML,YAML或Docblock Annotations配置实体的元数据。本入门指南将显示所有映射驱动程序的映射。文中的参考文献将用于XML映射。

也许我误会了。但是当我读到的时候

文中的参考文献将用于XML映射

我使用XML文件来配置元数据。但我应该使用Docblock Annotations,这就是我所要做的。

© www.soinside.com 2019 - 2024. All rights reserved.