Re: hasMany through - how to retrieve my data?

2012-09-19 Thread Robert Gravel
Maybe linkable will help you. https://github.com/Terr/linkable Robert -- Like Us on FacekBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, se

Re: hasMany through - how to retrieve my data?

2012-09-17 Thread Nvp
I also tried HABTM with the same result, I can't retrieve the data that I need. But as fas as I know there is no big difference between hasMany through (Join Model) and HABTM. I'll be glad if you help me correctly retrieve my data with conditions I posted in the first message, no matter if you c

Re: hasMany through - how to retrieve my data?

2012-09-16 Thread Jonathan Sundquist
Why are you using a hasMany instead of a hasAndBelongsToMany? You wouldn't need the id column as you two ideas together would be your index. - "The cold winds are rising" On Sep 16, 2012 5:17 PM, "Nvp" wrote: > Hi! > I built DB with tables: > > *restaurants* - main table > > *kitchens* - second

hasMany through - how to retrieve my data?

2012-09-16 Thread Nvp
Hi! I built DB with tables: *restaurants* - main table *kitchens* - second table *kitchen_restaurants* - join table with fields: id, kitchen_id, restaurant_id *Model/Restaurant.php*: public $hasMany = array( 'KitchenRestaurant' ); *Model/Kitchen.php*: public $hasMany = array(