Log message #4124241

# At Username Text
# Mar 12th 2018, 15:49 neon1024 You can change the pagination url in the helper options
# Mar 12th 2018, 15:49 learningcake no, the id is not persisted between pagination requests. Don't know how to make it persistent since the url is meant to be a unique link http://localhost:8765/mystore/63
# Mar 12th 2018, 15:49 neon1024 I hope the user id isn’t exposed to the url
# Mar 12th 2018, 15:48 dorxy if you execute `$this->request->session()->write('User.id',$this->request->getParam('id'));` again on the next page, and maybe the ID param is not present in the URI at that point?
# Mar 12th 2018, 15:47 dorxy is the id parameter persisted between the pagination requests?
# Mar 12th 2018, 15:46 learningcake '63' being the parameter
# Mar 12th 2018, 15:46 learningcake http://localhost:8765/mystore/63
# Mar 12th 2018, 15:46 dorxy @learningcake it also depends where exectly you execute the write and read
# Mar 12th 2018, 15:45 raul338 should be getQuery / getData ?
# Mar 12th 2018, 15:45 learningcake I created a method that searches database base on id parameter
# Mar 12th 2018, 15:43 raul338 why getParam('id') ?
# Mar 12th 2018, 15:43 learningcake any idea why my session doesn't work?
# Mar 12th 2018, 15:35 kitcat711 thx
# Mar 12th 2018, 15:35 kitcat711 raul338: the error was the return inside the map
# Mar 12th 2018, 15:33 learningcake when I move to the next page, debugs show false
# Mar 12th 2018, 15:33 learningcake $this->request->session()->write('User.id',$this->request->getParam('id')); $id = $this->request->session()->read('User.id'); debug($id);
# Mar 12th 2018, 15:32 learningcake is it possible for pagination to destroy session when I move to the next page?
# Mar 12th 2018, 15:31 raul338 also the return inside the map
# Mar 12th 2018, 15:31 raul338 you're missing hydrate(false) in the second example
# Mar 12th 2018, 15:28 kitcat711 raul338: I think (see gist)
# Mar 12th 2018, 15:27 kitcat711 easier with my gist
# Mar 12th 2018, 15:27 kitcat711 https://gist.github.com/Kitcat711/b22fb783382e2bc9d22b9025d21f20ca
# Mar 12th 2018, 15:24 raul338 are you returning the $query in the finder?
# Mar 12th 2018, 15:23 kitcat711 no error, but no results too
# Mar 12th 2018, 15:22 kitcat711 I spoke to quicly
# Mar 12th 2018, 15:09 kitcat711 found my way out
# Mar 12th 2018, 15:09 kitcat711 thx dorxy
# Mar 12th 2018, 15:07 dorxy @kitcat711 https://book.cakephp.org/3.0/en/orm/retrieving-data-and-resultsets.html#custom-finder-methods
# Mar 12th 2018, 15:05 kitcat711 I am on 3.5
# Mar 12th 2018, 14:59 raul338 I do not konw about cakephp2
# Mar 12th 2018, 14:59 raul338 in cakephp3 in the table class
# Mar 12th 2018, 14:59 kitcat711 where do I define my fonder: model or entity ?
# Mar 12th 2018, 14:58 kitcat711 thx raul338
# Mar 12th 2018, 14:56 raul338 you should use a finder, when you want formatResults you call `$query->find('customFormat')`
# Mar 12th 2018, 14:54 kitcat711 When using formatResults(..), is there a way to define the format or do I need to rewrite everytime the format function ?
# Mar 12th 2018, 14:53 kitcat711 Hello
# Mar 12th 2018, 14:50 learningcake thank you guys for the help
# Mar 12th 2018, 14:42 Neon1024 Here, https://irc.cakephp.org/logs/link/4124154#message4124164
# Mar 12th 2018, 14:42 raul338 you should use a client that keeps history :P
# Mar 12th 2018, 14:42 learningcake ok. thank you. let me read up on the link and follow your example
# Mar 12th 2018, 14:42 raul338 I said "you can also set contain into $paginate options (maybe it was $pagination)"