This far from an ideal solution, but it might be workable...
Schema:
runs
id INT
exec_id INT
...
execs
id INT
exec_type1s
id INT
exec_id INT
...
exec_type2s
id INT
exec_id INT
...
Models:
Run
belongs_to Exec
Exec
has_many Run
has_one ExecType1, ExecType2
ExecType1
belongs_to Exec
ExecType2
belongs_to Exec
In OO terms, Exec becomes an 'Abstract Base Class' of sorts. If you
want all Execs, Exec->findAll, if you want all Type 1 Execs,
ExecType1->findAll. The only tricky bit is to remember to always use
"/execs/show/{$the_record['Exec']['id'}". And when you have an array
of Execs, you can infer the type from the fact that only one of
$the_record['ExecType1'] and $the_record['ExecType2'] will be non-empty.
hth,
scott.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---