This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use the new forum.
Home » legacy support » symfony 1.1 » [Solved] Problem with Form Generator
[Solved] Problem with Form Generator [message #98126] Tue, 27 April 2010 14:10 Go to next message
Shootix  is currently offline Shootix
Messages: 1
Registered: April 2010
Junior Member
Hello,

Firstly, sorry for my english but I am french. And I am beginner with Symfony.

I have in my schema.yml :
propel:
  blog_rubrique:
    _attributes: { isI18N: true, i18nTable: blog_rubrique_i18n }
    id : { type: integer, required: true, primaryKey: true, autoincrement: true }
  blog_rubrique_i18n:
    id: { type: integer, required: true, primaryKey: true, foreignTable: blog_rubrique, foreignReference: id }
    culture: { isCulture: true, type: varchar, size: 7, required: true, primaryKey: true }
    titre: { type: varchar, size: 255 }
  blog_article:
    _attributes: { isI18N: true, i18nTable: blog_article_i18n }
    id: { type: integer, required: true, primaryKey: true, autoincrement: true }
  blog_article_i18n:
    id: { type: integer, required: true, primaryKey: true, foreignTable: blog_article, foreignReference: id }
    culture: { isCulture: true, type: varchar, size: 7, required: true, primaryKey: true }
    titre: { type: varchar, size: 255 }
    contenu: { type: longvarchar }


And when I generate the forms, the forms class are not generated.
After looking in the code, I saw that in the sfPropelFormGenerator class, in the generate method.

There is a line :
foreach ($this->dbMap->getTables() as $tableName => $table)


And $this->dbMap->getTables() returns null.

What can I do ?

Response :

In the MapBuilder classes
Instead of :
$this->dbMap = Propel::getDatabaseMap('propel');


It was :
$this->dbMap = Propel::getDatabaseMap(' propel');


So with the space, propel wasn't existed.

[Updated on: Tue, 27 April 2010 16:52]

Re: [Solved] Problem with Form Generator [message #98404 is a reply to message #98126 ] Sun, 02 May 2010 20:45 Go to previous message
lkrubner  is currently offline lkrubner
Messages: 297
Registered: July 2008
Location: Virginia, USA
Faithful Member
I think at least 50% of all the errors I ever have with Symfony trace back to a yaml file. In your case, I assume the extra space before " propel" started off as an error in one of your yaml files?



Symfony Experts offers answers: http://www.symfonyexperts.com/
Previous Topic:Server memory problems
Next Topic:session time out
Goto Forum:
  

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software