try to do an insert with the data you are testing directly into your
database, so I noticed you need the user_id and stage_id


2010/7/1 Andrei Mita <[email protected]>

> The action is the above one and the model(with validation rules deleted):
>
> <?php
> class Game extends AppModel {
>     var $name = 'Game';
>
>     var $belongsTo = array(
>         'Stage' => array(
>             'className' => 'Stage',
>             'foreignKey' => 'stage_id',
>         ),
>         'User' => array(
>             'className' => 'User',
>             'foreignKey' => 'user_id',
>         )
>     );
>
>     var $hasMany = array(
>         'Answer' => array(
>             'className' => 'Answer',
>             'foreignKey' => 'game_id',
>             'dependent' => false,
>         )
>     );
>
> }
> ?>
>
>
> On Thu, Jul 1, 2010 at 8:04 PM, Edinei L. Cipriani <[email protected]>wrote:
>
>> Em 01/07/10 13:57, Andrei Mita escreveu:
>>
>>  I am unbelievably stupid some times. I have lost two days trying to
>>> figure this one out and it never crossed my mind to check the validation
>>> rules in the model. And everything was right there in the manual: "If for
>>> some reason your data isn't saving, be sure to check to see if some
>>> validation rules aren't being broken."
>>>
>> Please, paste your action and your model, for me.
>>
>>
>> Check out the new CakePHP Questions site http://cakeqs.org and help
>> others with their CakePHP related questions.
>>
>> You received this message because you are subscribed to the Google Groups
>> "CakePHP" group.
>> To post to this group, send email to [email protected]
>> To unsubscribe from this group, send email to
>> [email protected]<cake-php%[email protected]>For
>>  more options, visit this group at
>> http://groups.google.com/group/cake-php?hl=en
>>
>
>  Check out the new CakePHP Questions site http://cakeqs.org and help
> others with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<cake-php%[email protected]>For
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>



-- 
Edinei L. Cipriani
Blog: http://phpedinei.wordpress.com
Twitter: http://www.twitter.com/phpedinei

Desenvolvedor Colégio Trilingue Inovação
Site: http://www.colegioinovacao.com.br
Fone 49 84149086

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" 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/cake-php?hl=en

Reply via email to