Nazdar,
15. 8. 2006, Samuel DeVore napisal:
some examples can be found at
http://cakebaker.wordpress.com/2006/02/22/new-feature-bindmodelunbindmodel/
Sam D
Thanks, it works:
$this-WaypointType-bindModel(array('hasMany' = array('Waypoint'
=array('foreignKey' = 'waypoint_type_id',
In different situations in my application I need use different
conditions in model assocciations and every time i must use bindModel
or there is another way how to do it ?
you could create multiple associations in your models (you can link
the 2 same models using different names as many times
Hello,
I have 2 models connected with this associations:
Waypoint belongsTo WaypointType
WaypointType hasMany Waypoint
I do this:
$this-set('waypoint_types', $this-WaypointType-findAll());
It gives me all WaypointTypes with _all_ associated Waypoints. But I
want obtain only associated
use bindModel
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more
some examples can be found at http://cakebaker.wordpress.com/2006/02/22/new-feature-bindmodelunbindmodel/Sam Dps it a great feature, but if you find yourself using it all the time you might want to think about adding conditions to the model files them self and undoing the conditions when you do