hi folks,
this is a common issue, and there's a really good solution presented
by ad7Six in this thread:
http://tinyurl.com/2thlcb
hth
jon
On 5/13/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> I don't know if this will work... but one idea would be to put the
> associations in the mode
I don't know if this will work... but one idea would be to put the
associations in the model constructor.
class Door extends AppModel {
function __contruct(){
//dont forget to call the parent constructor!
$args = func_get_args();
call_user_func_array(array($this, 'parent::
I played with this for a bit and ended up using bindModel anyway. Yes,
it is good practice to keep the associations in the model, but
sometimes you need to 'override' the logic. So, I have the general
associations in the models, and then use bindModel in my controller
actions when I want something
I've heard that it's good practice to put associations in the model
(rather than using bindModel) but when declairing a HABTM
relationship, I can't figure out how to add conditions or variables to
the relationship declairation.
For example,
class Product extends AppModel {
var $hasAndBelongsToM