I have an app that is basically a menu of products. A user selects
products in 34 drop-downs, and then it spits out a custom menu in PDF
format. I have the associations set up as follows:
///Model 'Enhancement' (excerpt)
var $hasMany = array(
'ProductOne' => array(
'className' => 'Menu',
'foreignKey' => 'ID' ),
'ProductTwo' => array(
'className' => 'Menu',
'foreignKey' => 'ID' ),
//...Continued in this fashion...\\
'ProductThirtyFour' => array(
'className' => 'Menu',
'foreignKey' => 'ID' ));
////Model 'Menu' (excerpt)
var $belongsTo = array(
'ProductOne' => array(
'className' => 'Enhancement',
'foreignKey' => product_one' ),
'ProductTwo' => array(
'className' => 'Enhancement',
'foreignKey' => 'product_two' ),
//...Continued in this fashion...\\
'ProductThirtyFour' => array(
'className' => 'Enhancement',
'foreignKey' => 'product_three'
));
The problem is that I keep getting the error:
SQL Error in model Menu: 1116: Too many tables. MySQL can only use 31
tables in a join
I'm porting this app over from a procedural script, in which I have 34
different queries for each associated product field in the 'menus'
table. It seems that Cake is instead trying to do one massive join with
all the associations.
Anyone have any ideas of how I can get this app to work in Cake?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" 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
-~----------~----~----~----~------~----~------~--~---