views:

467

answers:

2

Is it possible to generate model in Propel using Schema.xml, instead of Schema.yml?

There was once upon a time when xml was used for database generation in Propel, but it had been dropped in favor of yml. I should go for yml if I were handcoding my database schema, but now since I directly export my database schema from MySQL workbench using a plugin, and the result is in xml format, I have no choice but to work with xml.

A: 

I have found the answer: Just put your schema.xml in the folder where schema.yml is located and run the command line

php symfony propel:build-model

and you will be fine.

Ngu Soon Hui
+1  A: 

I'm not using a yml file at all, because I don't use Symfony. In the folder contining my build.properties file, I run:

propel-gen ./ creole

That connexts to my database, reverse engineers it, and generates my schema.xml Then I just run:

propel-gen ./

That uses the schema.xml file to generate my models.

lo_fye