# |
Jul 8th 2017, 09:39 |
rudy1976s |
in my controller I would expect to use Attributes in contain array isn’t it ? |
# |
Jul 8th 2017, 09:38 |
rudy1976s |
when make query I have error in contain because it search for a table attributes while the table in db is posts_attributes and set in initialize method too |
# |
Jul 8th 2017, 09:37 |
rudy1976s |
‘Attributes’ => [ ‘className’ => ‘Acm3Core.PostsAttributes’, ‘foreignKey’ => ‘post_id’, ‘dependent’ => true ], |
# |
Jul 8th 2017, 09:37 |
rudy1976s |
I have a post table associated with many PostsAttributes |
# |
Jul 8th 2017, 09:37 |
birdy247 |
example? |
# |
Jul 8th 2017, 09:37 |
rudy1976s |
cake 3.x |
# |
Jul 8th 2017, 09:36 |
rudy1976s |
A question: does contain in query support Table aliasing ? |
# |
Jul 8th 2017, 09:36 |
rudy1976s |
Hello good morning ! |
# |
Jul 8th 2017, 09:05 |
abc__ |
hi |
# |
Jul 8th 2017, 08:20 |
birdy247 |
like it :slightly_smiling_face: |
# |
Jul 8th 2017, 08:20 |
birdy247 |
@savant, tried you up load plugin the other day |
# |
Jul 8th 2017, 08:19 |
birdy247 |
Morning |
# |
Jul 8th 2017, 06:43 |
savant |
@adityapansari no |
# |
Jul 8th 2017, 04:26 |
adityapansari |
hey, Is there any difference between these two- ->contain(['ScaleOptions', 'ScaleQuestions']) AND [ 'contain' => ['ScaleOptions', 'ScaleQuestions'] ] |
# |
Jul 8th 2017, 04:11 |
spencdev |
I'm honestly not even sure why its doing a count, other than maybe pagination |
# |
Jul 8th 2017, 04:11 |
spencdev |
anyone ever have an issue with select count taking 6000ms? |
# |
Jul 7th 2017, 23:40 |
spencdev |
So I tried working it that way, and it's not the results I was hoping for. I feel like it's pretty simple, but i'm just missing something or perhaps I need to write it myself. I'm attempting to add a javascript variable to a link, AFTER it has already rendered. Such as `url: 'listings/more/'+page+''` instead, I'm getting it as entities. Almost as if it needs escaped, but there is not escape option |
# |
Jul 7th 2017, 22:17 |
Lencl |
hi |
# |
Jul 7th 2017, 21:45 |
gutts |
seems like epilog is used in conjunction with insert. |
# |
Jul 7th 2017, 21:42 |
gutts |
ff |
# |
Jul 7th 2017, 21:17 |
flashios09 |
@birdy247 try and see |
# |
Jul 7th 2017, 21:17 |
birdy247 |
@flashios09 and that is ok? |
# |
Jul 7th 2017, 21:16 |
gutts |
is there a way i can make ->newEntity/->save() do on duplicate update? |
# |
Jul 7th 2017, 20:56 |
flashios09 |
try `class ComputerPluginController extends \App\Controller\AppController ...` then `class MyComputerController extends plugin_namespace\CompuerPluginController ...` |
# |
Jul 7th 2017, 20:52 |
birdy247 |
as it is then not extending AppController |
# |
Jul 7th 2017, 20:52 |
birdy247 |
App extneding aPlugin |
# |
Jul 7th 2017, 20:51 |
birdy247 |
it seems wrong |
# |
Jul 7th 2017, 20:51 |
birdy247 |
actually |
# |
Jul 7th 2017, 20:51 |
flashios09 |
then with js you can do `$('#data').data('page')` to read the value |
# |
Jul 7th 2017, 20:50 |
flashios09 |
or you can use a hidden div like this `div style=“display:none” data-page=“<?= $your_page_var ?>“></div |
# |
Jul 7th 2017, 20:48 |
flashios09 |
you can access cookies(read/write) on php and js |
# |
Jul 7th 2017, 20:47 |
flashios09 |
@spencdev as i said before, try cookies |
# |
Jul 7th 2017, 20:47 |
akkaweb |
Thanks @inoas |
# |
Jul 7th 2017, 20:46 |
spencdev |
but instead of outputting more/' + Page + ' yadda it converts it to entities |
# |
Jul 7th 2017, 20:46 |
birdy247 |
MyComputers extends PluginsComputers |
# |
Jul 7th 2017, 20:45 |
birdy247 |
my app is extending the plugins controller |
# |
Jul 7th 2017, 20:45 |
spencdev |
sorry, build not script |
# |
Jul 7th 2017, 20:44 |
spencdev |
like:`url: '?= $this->Url->script(['action' => 'more', "'+Page+'", '?' => $this->request-getQueryParams()])` |
# |
Jul 7th 2017, 20:44 |
flashios09 |
your plugin controller will extend the cake controller |
# |
Jul 7th 2017, 20:44 |
flashios09 |
@birdy247 i didn’t try this before but i think it works |
# |
Jul 7th 2017, 20:42 |
flashios09 |
try cookie |