Hello,

I have two models: Stores and Warehouse, with a HABTM relationship
between them.
Now, I want to get the warehouses related to a certain Store.


(in other model)

$warehouses = $this->Warehouse->find('all', array('contain' =>
'Store'));

This returns all the warehouses trimmed down at the store level

If I do:

$warehouses = $this->Warehouse->find('all', array('contain' => array(
'Store' => array ('conditions' => array(
                'Store.id' => $storeid)))));


It still returns every warehouse, even some empty ones at the Store
level.

btw, using mssql

Thanks in advance

--~--~---------~--~----~------------~-------~--~----~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to