views:

26

answers:

1

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

User:
  anonymous:
    nickname: anonymous
    first_name: Anonymous

  david:
    nickname: david
    first_name: David

How do I tell propel where to find this file. Do I need to add any instructions to the build.properties

and how do I run it to insert the data into the database (I've already done propel-gen insert-sql, do I need to repeat it or something)

Note: I'm using Propel in a php project not a Symfony project so don't have access to any settings Symfony may have added if any.

+1  A: 

Loading data from fixtures is a feature that Symfony adds to Propel, it is not a part of the "core" Propel framework. So if you don't use Symfony, you can't load the data without other code. It might be possible to isolate and strip out the code from the sfPropelData class that does the actual loading, so you can use it in another framework. Please release your code to the public if you succeed in this, others might like it too!

Jan Fabry