Ah. My fault. It would appear that I had a condition in the
belongsTo relationship that was not needed...
'conditions' => array('Size.size_type_id' =>
'StockItem.Product.size_type_id'),
Thanks for your help.
T
On Apr 16, 2:49 pm, Grzegorz Pawlik <[email protected]> wrote:
> here: (`StockItem`.`size_id`
> = `Size`.`id` AND `Size`.`size_type_id` =
> 'StockItem.Product.size_type_id')
> After 'AND' you have something that is not automatically generated by
> cake. You must have something extra in StockItem->find() passed, or in
> relation definition (ie. in conditions field).
> Please pass some more code. John's right - we dont have anough info :)
>
> On Apr 16, 9:34 am, John Andersen <[email protected]> wrote:
>
> > In your controller, which fetches all the StockItems for a given
> > product, how does it do that? Sorry for asking, but I do not see
> > anything automatically fetching the required information, but I don't
> > know all about CakePHP yet :)
>
> > If you know the product, then you should fetch the stockitems from the
> > product model point of view, not from the stockitem model point of
> > view.
> > John
>
> > On Apr 16, 10:07 am, Toby <[email protected]> wrote:
>
> > > There isn't a find call, I was relying on automatic call, as this
> > > seems to get it almost right.
>
> > > Do I need to specify the find call myself then?
>
> > > T
>
> > > On Apr 16, 6:24 am, John Andersen <[email protected]> wrote:
>
> > > > How does the find call look like in your controller?
> > > > John
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---