# |
Aug 8th 2008, 16:12 |
teknoid |
CrazyTux[m]: $uses() is meant for loading unrelated models (completely unrelated) if you have User->Comment->Rating->RatingSystem ... and you say $uses('User') ... all other models in the chain are loaded too |
# |
Aug 8th 2008, 16:12 |
aarongustafson |
is it because I'm setting the query as a string to a $sql variable and then passing that to $this->query()? |
# |
Aug 8th 2008, 16:12 |
aarongustafson |
I just have a quick question: I am writing a little custom SQL for a model and (for some reason) my single quotes (around string values) are being converted to html entities and causing the query to fail. |
# |
Aug 8th 2008, 16:11 |
CrazyTux[m] |
teknoid, ok, so when $uses is defined, ALL models that want to be included, even the ones that NORMALLY are pre loaded, need to be defined within uses. |
# |
Aug 8th 2008, 16:11 |
teknoid |
CrazyTux[m]: see the difference? |
# |
Aug 8th 2008, 16:10 |
teknoid |
CrazyTux[m]: but once you load the Therapy model Condition will be loaded too |
# |
Aug 8th 2008, 16:10 |
CrazyTux[m] |
teknoid, ok now you have me confused |
# |
Aug 8th 2008, 16:10 |
teknoid |
CrazyTux[m]: because it never loaded the "main" model, you do need that if you decide to have $uses |
# |
Aug 8th 2008, 16:10 |
CrazyTux[m] |
teknoid, so it is as if it overwrites, the default loading of the models? when implementing uses? |
# |
Aug 8th 2008, 16:10 |
CrazyTux[m] |
teknoid, public $uses = array('Services', 'WebListing'); |
# |
Aug 8th 2008, 16:09 |
CrazyTux[m] |
teknoid, $this->Therapy->contain(array('id')); |
# |
Aug 8th 2008, 16:09 |
CrazyTux[m] |
Controller therapies_controller, therapy model..... |
# |
Aug 8th 2008, 16:09 |
teknoid |
CrazyTux[m]: doing what? |
# |
Aug 8th 2008, 16:09 |
CrazyTux[m] |
teknoid, when I don't include the model, of the controller itself |
# |
Aug 8th 2008, 16:09 |
unigue_ |
vudew: The auth component will automatically hash the password field if the username field is also present in the submitted data |
# |
Aug 8th 2008, 16:09 |
teknoid |
vudew: are you following the manual? |
# |
Aug 8th 2008, 16:09 |
CrazyTux[m] |
teknoid, so why would I get... "call to method of non object on line X" |
# |
Aug 8th 2008, 16:08 |
CrazyTux[m] |
teknoid, ok cool. |
# |
Aug 8th 2008, 16:08 |
teknoid |
CrazyTux[m]: all associated models to your "main" model are loaded by default |
# |
Aug 8th 2008, 16:08 |
vudew |
login isnt hashing hte password |
# |
Aug 8th 2008, 16:07 |
CrazyTux[m] |
teknoid, in other words if I have a HABTM, do I need to define it in uses, if I need to define USES for something else |
# |
Aug 8th 2008, 16:07 |
CrazyTux[m] |
teknoid, all models within that, as in SOLEY that, and would ignore a HABTM realtionship, or ?? |
# |
Aug 8th 2008, 16:07 |
zmonteca |
teknoid: well, echo sprintf(), but i'm guessing that doesn't matter. i think i'm using the default ajax layout, but not sure. |
# |
Aug 8th 2008, 16:07 |
teknoid |
CrazyTux[m]: $uses instantiates all the model objects |
# |
Aug 8th 2008, 16:06 |
Symbi0nt |
on cake 1.2 in the index() how can I set conditions loke order by in the $this->paginate() function? |
# |
Aug 8th 2008, 16:06 |
zmonteca |
teknoid: just echo |
# |
Aug 8th 2008, 16:06 |
CrazyTux[m] |
teknoid, one more question, when I define $uses, does it overwrite, all automagic stuff, or does it just append these models need to have acesss. |
# |
Aug 8th 2008, 16:05 |
teknoid |
zmonteca: how are you displaying the actions data in the view? |
# |
Aug 8th 2008, 16:04 |
CrazyTux[m] |
teknoid, now, I get an error, Fatal error: Call to a member function contain() on a non-object, on line 8, shouldnt it already be included without me calling uses. |
# |
Aug 8th 2008, 16:04 |
teknoid |
CrazyTux[m]: if you are in therapies Condition is accessed with $this->Therapy->Condition |
# |
Aug 8th 2008, 16:04 |
CrazyTux[m] |
teknoid, controller method mainView() |
# |
Aug 8th 2008, 16:04 |
CrazyTux[m] |
teknoid, http://pastebin.com/d1f8de6cf |
# |
Aug 8th 2008, 16:03 |
CrazyTux[m] |
teknoid, therapy model: http://pastebin.com/d760d1eff, condition model: http://pastebin.com/d249f444c |
# |
Aug 8th 2008, 16:02 |
zmonteca |
to append...my output is just generic cake sql log describe junk...nothing else. |
# |
Aug 8th 2008, 16:02 |
CrazyTux[m] |
teknoid, one moment, pastbin. |
# |
Aug 8th 2008, 16:02 |
zmonteca |
i'm using ajaxhelper and observeField on a select box. according to firebug the post looks ok and the url request look ok. however, the out put doesn't appear to be anything in my requested method. any ideas? |
# |
Aug 8th 2008, 16:01 |
teknoid |
CrazyTux[m]: for example? |
# |
Aug 8th 2008, 16:01 |
teknoid |
vudew: login() should handle all of that for you, i.e. compare the sent password with hashed password |
# |
Aug 8th 2008, 16:01 |
CrazyTux[m] |
teknoid, however, I have a HABTM relationship setup? |
# |
Aug 8th 2008, 16:01 |
CrazyTux[m] |
teknoid, why does it not include the models, when I don't use $uses |
# |
Aug 8th 2008, 15:59 |
teknoid |
CrazyTux[m]: sure, or just index |