On 15 Mag, 00:10, emmexx <[email protected]> wrote:

(cut)
> I created a model for segment with a belongsTo variable:
>
>         var $belongsTo = array(
>                 'Car' => array(
>                         'className' => 'Parameter',
>                         'foreignKey' => 'par1_id',
>                         'conditions' => array('Car.type_id' => 55)
(cut)
>
> I don't understand if I'm missing something or doing something wrong
> or I'm asking too much to cakephp.

I checked the code in cake/libs/model/model.php and the find function,
as I understand, doesn't care about $this->belongsTo.
Therefore I don't understand where and when the model association gets
used.
The manual in the chapter about Association (http://book.cakephp.org/
view/78/Associations-Linking-Models-Together) says:

"Once this association has been defined, find operations on the User
model will also fetch a related Profile record if it exists: (...)"

   maxx

--~--~---------~--~----~------------~-------~--~----~
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