Thanks for the answer.
The schema file is huge, but this entity part (which doesn't have any
FK), is the following:
mbmkt_entity:
id:
name: { type: VARCHAR, size: '64', required: true }
address: { type: VARCHAR, size: '128', required: true }
postcode: { type: VARCHAR, size: '32', required: true }
country: { type: VARCHAR, size: '128' }
e_mail: { type: VARCHAR, size: '64' }
tax_id_number: { type: VARCHAR, size: '16', required: true }
website: { type: VARCHAR, size: '128' }
It was generated from an existing database, which was being used in
symfony 1.1 without any problem.
I'm using PostgreSQL.
Thanks a lot
On Sep 15, 4:51 pm, Casey <[email protected]> wrote:
> Sounds like there is something that is defined wrong in your schema
> file, can you post it? The actions look clean from what I can tell.
>
> On Sep 15, 8:21 am, Luis Nabais <[email protected]> wrote:
>
> > My form code:
> > <? echo form_remote_tag(array(
> > 'update' => array('success' => 'listEntities', 'failure' =>
> > 'create_form'),
> > 'url' => 'mbmkt_entity/update',
> > )) ?>
> > <table class="tableForm" cellpadding="0" cellspacing="0">
> > <? echo $form; ?>
> > <? echo $form->renderGlobalErrors() ?>
> > <? include_partial('global/formFooter');?>
> > </table>
> > </form>
>
> > My create action:
> > public function executeCreate()
> > {
> > $this->form = new MbmktEntityForm();
> > $this->setTemplate('edit');
>
> > }
>
> > My edit action:
> > public function executeEdit(sfWebRequest $request)
> > {
> > $this->form = new MbmktEntityForm(MbmktEntityPeer::retrieveByPk
> > ($request->getParameter('id')));
>
> > }
>
> > My update action:
> > public function executeUpdate(sfWebRequest $request)
> > {
> > $this->forward404Unless($request->isMethod('post'));
>
> > $this->form = new MbmktEntityForm(MbmktEntityPeer::retrieveByPk
> > ($request->getParameter('id')));
>
> > $this->form->bind($request->getParameter('entity'),
> > $request->getFiles('entity'));
>
> > if ($this->form->isValid())
> > {
> > $entity = $this->form->getObject();
> > $entity->save();
> > }
> > $this->setTemplate('edit');
>
> > }
>
> > I hope this helps. Thanks a lot for your help.
>
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---