Good day.
I am a rather new user of symfony framework.
The short description of my problem is: form data is not saved to
database in generated module.
I generate schema from database ant then build model:
# symfony propel:build-schema
# symfony propel:build-model
# symfony propel:build-forms
Then I ask symfony to build module:
# symfony propel:generate-module --non-verbose-templates --with-show
frontend item Item
As a result I get module where I can create, insert, update and delete
items. But when I try to add new item the form data is not saved. The
new record is created but the only filled column is
"ID" (auto_increment field).
I believe that the problem exists because by database contains field
names with capital letters.
I have explored method calls and found that the problem (as i think)
is in sfFormPropel::updateObject.
It calls $this->object->fromArray($values,
BasePeer::TYPE_FIELDNAME);
But BaseItemPeer::fieldKeys[BasePeer::TYPE_FIELDNAME] contains filed
names with capital letters, while form field names are lowercase.
Will it correct to change sfFormPropel::updateObject line from
$this->object->fromArray($values, BasePeer::TYPE_FIELDNAME);
to
$this->object->fromArray($values, BasePeer::TYPE_STUDLYPHPNAME);
?
Thank you.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---