Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.
If the asker does not get an answer then they have 10 days to request a refund.
$20
I need help with schema and propel-build-model in Symfony 1.0
This is the first time I've ever worked with version 1.0 of Symfony (I started using Symfony at version 1.1 and have never before had to work on an old installation).
I'm converting an old Java site to Symfony. I am just starting on this project, but the project has been ongoing. Parts of the Symfony site have been under development for 2 years. This company is slowly changing all of their code from the 90s and early 00s over to Symfony. However, for some reason they chose not to use the YAML files. They hand coded all their model classes.
I just created the first entry for a table in the top level config/schema.yml:
propel:
oracle_import:
id: { type:integer, required: true, primaryKey: true, autoIncrement: true }
type_id: { type:integer, required:false }
title: { type:varchar(255), required:false }
byline: { type:varchar(255), required:false }
header: { type:longvarchar, required:false }
subheader: { type:longvarchar, required:false }
body: { type:longvarchar, required:false }
footer: { type:longvarchar, required:false }
live_flag: { type:varchar(1), required:false }
date: { type:timestamp, required:false }
created_by_user: { type:varchar(30), required:false }
modify_by_user: { type:varchar(30), required:false }
I wanted to auto-generate the model class for this. I looked here to find the right command for version 1.0 of Symfony:
http://www.symfony-project.org/book/1_0/08-Inside-the-Model-Layer
Then I ran this command:
symfony propel-build-model
I got this error:
Fatal error: Unsupported operand types in /usr/share/php/symfony/util/Spyc.class.php on line 667
Does anyone know what this means? How to troubleshoot this?
This question has been answered.
marshall | 04/05/10 at 6:07pm
Edit
(5) Possible Answers Submitted...
See a chronological view of answers?
Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.
-

Last edited:
04/05/10
9:54pmWouter Peschier says:It could be a problem with not having space after the colon.
So instead of writing:
id: { type:integer, required: true, primaryKey: true, autoIncrement: true }
type_id: { type:integer, required:false }
etc.
write it like this:
id: { type: integer, required: true, primaryKey: true, autoIncrement: true }
type_id: { type: integer, required: false }
etc.Previous versions of this answer: 04/05/10 at 6:15pm
-

Last edited:
04/05/10
6:14pmArturo Linares says:You need a space after each colon.
Replace:
id: { type:integer ...
with
id: { type: integer
-

Last edited:
04/05/10
6:23pmMarcos IbaƱez says:You have to put a blank space between every colon and it's value.
Do that for each pair of label-value and it will work without problems.
Here is the correct yaml file:
propel:
oracle_import:
id: { type: integer, required: true, primaryKey: true, autoIncrement: true }
type_id: { type: integer, required: false }
title: { type: varchar(255), required: false }
byline: { type: varchar(255), required: false }
header: { type: longvarchar, required: false }
subheader: { type: longvarchar, required: false }
body: { type: longvarchar, required: false }
footer: { type: longvarchar, required: false }
live_flag: { type: varchar(1), required: false }
date: { type: timestamp, required: false }
created_by_user: { type: varchar(30), required: false }
modify_by_user: { type: varchar(30), required: false }
I attach an image of how the text should be formatted for it to work.Previous versions of this answer: 04/05/10 at 6:21pm | 04/05/10 at 6:22pm | 04/05/10 at 6:23pm
-

Last edited:
04/05/10
6:19pm -

Last edited:
04/05/10
6:55pmcasivaagustin says:The problem its the spaces like the other answers say. You must put a blank space after the semicolon, just like Marcos explained.
After you change your schema you must run.
symfony propel-build-model
And don't forget
symfony cc
Cheers
This question has expired.
Current status of this question: Completed
Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.
If the asker does not get an answer then they have 10 days to request a refund.
