Game hasMany Moves
Move belongsTo Game
Is it possible to specify in the Game model that a game should only be
created when at least one move is associated with the data?
For example, a call to Game::save( array('Game'=>array
('title'=>'foo)) ) should fail but a call to Game::save( array
('Game'=>array('title'=>'foo), 'Move'=>array('data'=>'bar')) ) should
succeed because there is a move attached.
Also, obviously if the Move object can't be saved for some reason then
the entire thing fails also.
Thanks for any input.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---
No comments:
Post a Comment