ahhh.

That will work. Thanks!

On Wed, Feb 24, 2010 at 12:28 AM, Gábor Fási <maerl...@gmail.com> wrote:
> Put your id (or something else unique) in the url, so you can use that
> to retrieve the object.
>
> On Wed, Feb 24, 2010 at 01:04, Roland Cruse <cruses...@gmail.com> wrote:
>> Thanks. That did it!
>>
>> Now I have:
>>
>> $parameters = $request->getParameter('td_excursion');
>>  $this->excursion =
>> Doctrine::getTable('TdExcursion')->findOneById($parameters['id']);
>>  $this->form = new TdExcursionForm($this->excursion);
>>
>> Though I am thinking there is a better way to get the hard coded array
>> name which $form->getName() can do...but hasn't been instantiated
>> yet...
>>
>> Thanks for your help.
>>
>> On Tue, Feb 23, 2010 at 2:52 PM, Christian Hammers <c...@lathspell.de> wrote:
>>> Hi
>>>
>>> This could mean that the form is always initialized with an empty
>>> $this->excursion. Sure that find() does not return an array?
>>> I always use ->findOneById($request->getParameter('id')); to be sure.
>>>
>>> bye,
>>>
>>> -christian-
>>>
>>> Am Tue, 23 Feb 2010 14:06:02 -0800
>>> schrieb Roland Cruse <cruses...@gmail.com>:
>>>
>>>> Hi
>>>>
>>>> I must be missing something. I am using symfony 1.3 and trying to
>>>> update a record in an action but what happens is an "insert
>>>> into".which generates an integrity error.
>>>>
>>>> Here is my code.
>>>>
>>>>      $this->excursion =
>>>> Doctrine::getTable('TdExcursion')->find($request->getParameter('id'));
>>>>
>>>>      $this->form = new TdExcursionForm($this->excursion);
>>>>
>>>>      $this->form->bind($request->getParameter($this->form->getName()));
>>>>
>>>>      if($this->form->isValid())
>>>>      {
>>>>        $excursion = $this->form->save();
>>>>      }
>>>>
>>>>  If someone could point me in the right direction that would be
>>>> excellent!
>>>>
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups 
>>> "symfony users" group.
>>> To post to this group, send email to symfony-us...@googlegroups.com.
>>> To unsubscribe from this group, send email to 
>>> symfony-users+unsubscr...@googlegroups.com.
>>> For more options, visit this group at 
>>> http://groups.google.com/group/symfony-users?hl=en.
>>>
>>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "symfony users" group.
>> To post to this group, send email to symfony-us...@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> symfony-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at 
>> http://groups.google.com/group/symfony-users?hl=en.
>>
>>
>
> --
> You received this message because you are subscribed to the Google Groups 
> "symfony users" group.
> To post to this group, send email to symfony-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> symfony-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/symfony-users?hl=en.
>
>

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to