Hi all,

I've read several similar posts so far but none was helping so far..

This is my schema.yml:
{{{
Order:
  tableName:    orders
  actAs:
    Timestampable:
  columns:
    id:         { type: integer(4), primary: true, autoincrement:
true }
    count:      { type: integer(4) }
    order_address_id: { type: integer(4) }
    sf_guard_user_id:    { type: integer(4) }
  relations:
    OrderAddress:
      local:    order_address_id
      foreign:  id
      foreignAlias: Order
      type: one
    sfGuardUser:
      type:     one

OrderItem:
  tableName:    order_items
  columns:
    order_id:   { type: integer(4) }
    medium_id:  { type: integer(4) }
    count:      { type: integer(4) }
  relations:
    Order:
      local:    order_id
      foreign:  id
      foreignAlias: Items
      type:     one
    Medium:
      local:    medium_id
      foreign:  id
      type:     one

OrderAddress:
  columns:
    id: { type: integer(4), primary: true }
    address_line_1: string(255)
    address_line_2: string(255)
    zip: string(10)
    city: string(64)
    country: string(32)
    verified: boolean
}}}

I want to show a form where all related Items are included.

{{{
    $this->form = new OrderForm();
    foreach($this->cart as $i => $item_data)
    {
      $item = new OrderItem();
      $item->medium_id = $item_data['medium']['id'];
      $item->count     = $item_data['num'];
      $this->form->embedForm('Items['.$i.']', new OrderItemForm
($item));
    }
}}}

$this->cart is an array of medium objects that the user wants to buy.
these are stored in a cookie.

Now this will always failing because of exceeding the max execution
time (30s) and end with the following stacktrace originating from the
template calling 'echo $form':

{{{
...
22      0.4096  5122028 sfFormField->render( )  ../sfForm.class.php:121
23      0.4097  5122028 sfWidgetFormSchema->render( )   ../
sfFormField.class.php:117
24      0.5241  5846132 sfWidgetFormSchema->renderField( )      ../
sfWidgetFormSchema.class.php:508
25      0.5246  5847720 sfWidgetFormSchemaDecorator->render( )  ../
sfWidgetFormSchema.class.php:463
26      0.5246  5847776 sfWidgetFormSchema->render( )   ../
sfWidgetFormSchemaDecorator.class.php:61
27      0.5352  5883452 sfWidgetFormSchema->renderField( )      ../
sfWidgetFormSchema.class.php:508
28      0.5355  5883772 sfWidgetFormSelect->render( )   ../
sfWidgetFormSchema.class.php:463
29      0.5355  5883772 sfCallable->call( )     ../sfWidgetFormSelect.class.php:
65
30      0.5355  5883772 call_user_func_array ( )        
../sfCallable.class.php:62
31      0.5355  5883772 sfWidgetFormDoctrineSelect->getChoices( )       ../
sfCallable.class.php:0
32      0.5359  5885012 Doctrine_Query_Abstract->execute( )     ../
sfWidgetFormDoctrineSelect.class.php:87
33      1.4578  6175616 Doctrine_Hydrator->hydrateResultSet( )  ../
Abstract.php:1036
34      34.3911 32266296        Doctrine_Access->offsetSet( )   ../Access.php:0
35      34.3911 32266296        Doctrine_Collection->add( )     
../Access.php:131
}}}


Any ideas? Hints?


Cheers
/Christian
--~--~---------~--~----~------------~-------~--~----~
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