【问题标题】:how to convert the file as to xml如何将文件转换为xml
【发布时间】:2013-08-28 10:10:48
【问题描述】:

如何将文件转换为xml

我的文件 ~/doctrine/User.orm.yml

Acme\UserBundle\Entity\User: 
type: entity 
table: fos_user id: id:
    type: integer
    generator:
        strategy: AUTO

manyToMany:
    groups:
        targetEntity: Group
        joinTable:
            name: fos_user_group
            joinColumns:
                user_id:
                    referencedColumnName: id
            inverseJoinColumns:
                group_id:
                    referencedColumnName: id

此文件为 user.orm.yml 格式,但我希望它为 file_name.orm.xml....
所以我想将它转换为 xml 格式...
我该怎么做?

【问题讨论】:

标签: xml symfony yaml symfony-2.1


【解决方案1】:

你需要在你的数据库中创建实体(如果它不存在的话),然后为你创建相应的 XML

$ php app/console doctrine:mapping:import --force AcmeUserBundle xml

请参阅Symfony documentation 以获得更多帮助。

【讨论】:

    猜你喜欢
    • 2014-10-26
    • 1970-01-01
    • 2019-06-03
    • 2012-06-15
    • 2014-11-11
    • 2014-04-15
    • 2012-08-13
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多