Pregunta

how to convert the file to xml

MyFile ~/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

this file is in user.orm.yml format But i want it as file_name.orm.xml....
so i want to convert it as the xml one...
how can i do this?

¿Fue útil?

Solución

You need to create the Entity in your database (if it does not already exist), and then doctrine:mapping:import which should create the corresponding XML for you

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

See Symfony documentation for more help.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top