Play ORM data

If I have a yml data fixture file named mydata.yml

User:
  anonymous:
    nickname: anonymous
    first_name: Anonymous

  david:
    nickname: david
    first_name: David

How to tell me where to find this file. Do I need to add any instructions tobuild.properties

and how to run it to insert data into the database (I already did propel-gen insert-sql, I need to repeat it or something like that)

Note. I use Propel in a php project, not in a Symfony project, so I don’t have access to any parameters that Symfony can add, if any.

+3
source share
2 answers

SQL (, fixtures.sql) Propel sqldb.map propel-gen insert-sql.

sqldb.map :

# Sqlfile -> Database map
schema.sql=yourdatabasename
fixtures.sql=yourdatabasename

sqldb.map , propel.sql.dir build.properties.

Symfony - yml SQL-, Propel .

+3

- , Symfony Propel, "" Propel. , Symfony, . , sfPropelData, , , , , , !

+2

Source: https://habr.com/ru/post/1770996/


All Articles