ERROR

500 | Internal Server Error | Doctrine_Validator_Exception Validation failed
in class document_trace

1 field had validation error:

* 1 validator failed on id_document (notnull)

is a new record ($ this-> getId ()), so it is empty.




2010/1/7 Stéphane <stephane.er...@gmail.com>

>  $q->set('id_document', $author->getId()); <- does it work ?
>
> if you get error message, please copy/past them.
>
> Cheers,
>
>
> Before Printing, Think about Your Environmental Responsibility!
> Avant d'Imprimer, Pensez à Votre Responsabilitée Environnementale!
>
>
> On Fri, Jan 8, 2010 at 1:02 AM, Gabo <gabopo...@gmail.com> wrote:
>
>>
>> HELP!!!
>>
>>
>> I TRY THIS:
>>
>> //lib/model/doctrine/document.class.php
>>
>> public function save(Doctrine_Connection $conn = null) {
>>
>>     $author= new document();
>>
>>     $author->setName($this->getName());
>>     $author->setDocumentDescription($this->getDocumentDescription());
>>     $author->save();
>>
>>     $sfUser = sfContext::getInstance();
>>
>>         $q = new document_trace();
>>         $q->set('id_document', $author);
>>      //NOT WORK, ERROR
>>          $q->set('id_user', $sfUser->getUser()->getGuardUser());
>>         $q->set('state', '0');
>>         $q->save();
>>
>>     return parent::save();
>> }
>>
>> I want to save to another table for example (date, id_user, id_document)
>> of the creation of a document for an audit ...
>>
>> I then keeping of large app / document to store the audit log .. but I
>> have to take the new id_document
>>
>> HELP!!
>>
>>
>>
>>
>>
>> 2010/1/6 Eno <symb...@gmail.com>
>>
>>> On Wed, 6 Jan 2010, Gabo wrote:
>>>
>>> > HELP!!
>>> >
>>> > I try to capture the id of a new record for storage in an external
>>> table
>>> > (document_trace) but not what brings me
>>>
>>> The ID comes from the database but you haven't saved the object so it has
>>> no ID yet.
>>>
>>>
>>>
>>> --
>>>
>>>
>>>
>>> --
>>>
>>> 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<symfony-users%2bunsubscr...@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<symfony-users%2bunsubscr...@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<symfony-users%2bunsubscr...@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.

Reply via email to