2

i'm trying to generate a data model of a symfony project from a mysql database already existing. I'm using the Propel ORM to map that database into the config/schema.yml file using this command

php symfony propel:build-schema

and it works correctly. All tables in mySQL database has its own description in config/schema.yml file. The problem i when i try to generate the model classes with the command

php symfony propel:build-model

The execution of this command generates only 5 set of classes (BaseName, Name, NamePeer ...), when the shcema has about 40 tables.

How can i fix that?? maybe there is a configuration file with the maximum classes generated from the schema or something like that.

Thank you :D

edit:

the schema.yml auto generated from the database is like this (i can't post here the real generated schema because of the privacy of the code, i'm )

propel:
 _attributes:
   package: lib.model
   defaultIdMethod: native
table1:
 _attributes: { phpName: Table1 }
   TABLE_ID: { phpName: TableCod, type: INTEGER, size: '8', required: true, foreignTable: table1, foreignReference: TABLE_ID, onDelete: RESTRICT, onUpdate: RESTRICT }
   FOREIGN_KEY: { phpName: ForeignKey, type: INTEGER, size: '8', required: true, foreignTable: other_table, foreignReference: OTHER_TABLE_ID, onDelete: RESTRICT, onUpdate: RESTRICT }
   NORMAL_ATRIBUTE: { phpName: NormalAtribute, type: LONGVARCHAR, required: false }
 _indexes: { TABLE_ID: [TABLE_ID], FOREIGN_KEY: [OTHER_TABLE_ID] }
table2:

...

edit2:

I found the error, i didn't see it >_<

PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tryed to allocate 35 bytes) in /usr/share/php/symfony/util/sfClassManipulator.class.php on line 186

1
  • It would be helful if you could add the generated schema in your answer Commented Jun 15, 2011 at 13:19

1 Answer 1

2

Solved by editting the php.ini file replacing the value of the script memory limit from -1 to 128. For some reason, symfony does not detect this parameter correctly (-1 means unlimited)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.