Do you have an up-to-date documlentation for symfony 1.4 and Doctrine.

I want to do some unit tests with manytomany model but impossible to
find the right syntax.

I saw an interesting documentation here
http://www.symfony-project.org/doctrine/1_2/en/06-Working-With-Data
but it is not up to date and the examples don't work.


I can explain more about my problem:

I have an object user which belongs to many (object) groups and i want
to do an unit test with that.

So, in my test i do that:

$user = new User();
$user->fromArray(array_merge(array(
                                                                          
'name'  => 'Julien',
                                                                          
'town'         => 'Paris',
                                                                          
'postalcode'   => '1000',
                                                                          ), 
$defaults));


$group= Doctrine::getTable('Group')->findOneById('2');

$user->setGroups($group);

$user->save();


It does not work because i have to pass a doctrine-collection into
setGroups method but how can i define that?

Please, help me.
Thanks



-- 
Vous recevez ce message, car vous êtes abonné au groupe Google 
Groupes Symfony-fr.
Pour envoyer un message à ce groupe, adressez un e-mail 
à [email protected].
Pour vous désabonner de ce groupe, envoyez un e-mail à l'adresse 
[email protected].
Pour plus d'options, consultez la page de ce groupe : 
http://groups.google.com/group/symfony-fr?hl=fr

Répondre à