Hi,
another question which I haven't been able to solve. I have this
relationship (which is only part of the complete picture):

Access:
  columns:
    id:
      type: integer(4)
      primary: true
      autoincrement: true
  relations:
    Invoice:
      local: id
      foreign: access_id

Invoice:
  columns:
    id:
      type: integer(4)
      primary: true
      autoincrement: true
    name:
      type: string(100)
      notnull: true
  relations:
    Payments:
      local: id
      foreign: payment_id
      class: Payment
      type: many

As this is part of an access-like system, I log when people come and
when they leave I call the Access->end() method which looks like this:

  public function end()
  {
    if ($this->getInvoice() == '')
    {
      $invoice = new Invoice();
      $invoice->setName($this->getCustomer()->getFullname());
      $invoice->setAccess($this);
      $invoice->save();
    }
    $this->save();
  }

When I call this method, I get this error:

Validation failed in class PaymentType
2 fields had validation errors:
* 1 validator failed on name (notnull)

The weird thing is that payment_id is not defined in my method and is
not an obligatory field, so it doesn't make sense.

Any idea how I can repair this?

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