Re: Problem with custom model function on hasAndBelongsToMany relationship

2009-02-16 Thread rob_page
Thanks for the response, but I still get the same error. It's like the TradingAccountsTradingSystem model just can't be seen from anywhere except it's own controller... Does anyone know if these join models need to be handled differently somehow? It appears that they do, but what needs to be do

Re: Problem with custom model function on hasAndBelongsToMany relationship

2009-02-16 Thread brian
I believe you need to call it like this $this->controller->TradingAccount->TradingAccountsTradingSystem->getSystemUsePercent(); Although, I'd probably create a method in TradingAccount that then called out to the other model. $this->controller->TradingAccount->getSUP(); function getSUP() { r

Problem with custom model function on hasAndBelongsToMany relationship

2009-02-16 Thread rob_page
Hello, I hope that someone can help me with this very odd problem. I'm trying to call a custom model function, and I keep getting the following error: SQL Error: 1064: You have an error in your SQL syntax; Query: getSystemUsePercent Now, I'm using custom model functions in many other places i