# |
Jan 30th 2014, 20:52 |
Fatalnix |
yeah. |
# |
Jan 30th 2014, 20:52 |
BackEndCoder |
well you are basicly telling the controller to use model A |
# |
Jan 30th 2014, 20:52 |
Fatalnix |
heh. |
# |
Jan 30th 2014, 20:52 |
BackEndCoder |
http://book.cakephp.org/2.0/en/models/model-attributes.html#usetable |
# |
Jan 30th 2014, 20:51 |
BackEndCoder |
http://book.cakephp.org/2.0/en/controllers.html#Controller::$uses |
# |
Jan 30th 2014, 20:51 |
todds |
Fatalnix, there are probably others in here better suited to answer that. But yeah, in so far that 'soon' is an ambigious term, it is coming soon. :) |
# |
Jan 30th 2014, 20:51 |
Fatalnix |
heh |
# |
Jan 30th 2014, 20:51 |
Fatalnix |
that is kind of a hack isn't it |
# |
Jan 30th 2014, 20:51 |
BackEndCoder |
let me find the page in the book |
# |
Jan 30th 2014, 20:51 |
BackEndCoder |
yeah |
# |
Jan 30th 2014, 20:51 |
Fatalnix |
as a public variable? |
# |
Jan 30th 2014, 20:51 |
Fatalnix |
hmm |
# |
Jan 30th 2014, 20:50 |
BackEndCoder |
that should fix it |
# |
Jan 30th 2014, 20:50 |
BackEndCoder |
Fatalnix, so yeah in your controller $uses = array('Cms'); in your model, make a Cms model, with the $useTable = 'cms' |
# |
Jan 30th 2014, 20:49 |
Fatalnix |
todds: Oh? is 3.x comin soon? |
# |
Jan 30th 2014, 20:49 |
todds |
Don't be scared, my child. Embrace it! |
# |
Jan 30th 2014, 20:49 |
BackEndCoder |
i was waiting till alpha |
# |
Jan 30th 2014, 20:49 |
BackEndCoder |
i havn';t had time to look at it yet |
# |
Jan 30th 2014, 20:49 |
the-neon |
3.x scares me. |
# |
Jan 30th 2014, 20:48 |
BackEndCoder |
chris______, great stuff |
# |
Jan 30th 2014, 20:48 |
chris______ |
BackEndCoder: it worked perfectly |
# |
Jan 30th 2014, 20:48 |
BackEndCoder |
but yeah in your Cms controller, it will assume to use Cm model |
# |
Jan 30th 2014, 20:48 |
Fatalnix |
BackEndCoder: Well you're talking to a Perl programmer, the universe is a hack :D |
# |
Jan 30th 2014, 20:48 |
BackEndCoder |
you can also loadModel() if you wanted |
# |
Jan 30th 2014, 20:48 |
todds |
in your position, I'd wait for 3.x to go stable. Models are a whole new world. :) |
# |
Jan 30th 2014, 20:47 |
Fatalnix |
hmm |
# |
Jan 30th 2014, 20:47 |
BackEndCoder |
but its a hack |
# |
Jan 30th 2014, 20:47 |
BackEndCoder |
Fatalnix, got it, so you have your Cms controller... it will try and use Cm model. and Cm table. you can tell it to use Cms model with uses |
# |
Jan 30th 2014, 20:47 |
Fatalnix |
I probably should since the last time I used CakePHP was back in 2008 heh |
# |
Jan 30th 2014, 20:46 |
todds |
oh! I know the answer, then. You'll wanna migration guide to 2.4. :-P |
# |
Jan 30th 2014, 20:46 |
Fatalnix |
I'm using newest stable afaik right now |
# |
Jan 30th 2014, 20:46 |
fnfilho |
still... the entire coments table by itself has around 4gb, the simple select limit 1 is still very slow with the server and version i'm running :/ |
# |
Jan 30th 2014, 20:46 |
BackEndCoder |
Fatalnix, cake 1.2 ? |
# |
Jan 30th 2014, 20:45 |
Fatalnix |
2008* |
# |
Jan 30th 2014, 20:45 |
Fatalnix |
Well that doesn't seem to do anything. This is from 2009 too, so I imagine it has probably changed. |
# |
Jan 30th 2014, 20:44 |
BackEndCoder |
and make your comments paginated |
# |
Jan 30th 2014, 20:44 |
BackEndCoder |
just use one of them |
# |
Jan 30th 2014, 20:44 |
BackEndCoder |
i think you should make the comments table big still |
# |
Jan 30th 2014, 20:44 |
BackEndCoder |
you will still crash |
# |
Jan 30th 2014, 20:44 |
BackEndCoder |
well the thing is... if its still looking thu all them tables for the output |
# |
Jan 30th 2014, 20:44 |
fnfilho |
todds, yeah... thats actually a way out |