So is your problem solved?

shams wrote:
> I use:
> - MySQL  5.0.51a-community-nt
> - PHP 5.2.8
> - symfony sandbox 1.2.4
> 
> Table defenition:
> 
> CREATE  TABLE IF NOT EXISTS `Project` (
>   `ID` INT NOT NULL AUTO_INCREMENT ,
>   `Name` VARCHAR(255) NOT NULL ,
>   `Price` DECIMAL(18,2) NOT NULL ,
>   `Image` VARCHAR(255) NOT NULL ,
>   PRIMARY KEY (`ID`) )
> ENGINE = MyISAM;
> 
> 
> I have tried to change all database names (tables and fields) to
> such_style and generated forms began to save entered data.
> 
> On 13 фев, 19:57, Tom Haskins-Vaughan <[email protected]>
> wrote:
>> What database are you using?
>>
>>
>>
>> shams wrote:
>>> 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.
>> --
>> Tom Haskins-Vaughan
>> Temple Street Media: Design and Development for the Web
>> [email protected] |www.templestreetmedia.com
> > 
> 

-- 
Tom Haskins-Vaughan
Temple Street Media: Design and Development for the Web
[email protected] | www.templestreetmedia.com


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to