Log message #4051907

# At Username Text
# Jul 14th 2017, 11:23 neon1024 Not sure I need all the collection methods, could be too much overhead perhaps
# Jul 14th 2017, 11:21 neon1024 Or would I be better off using the core’s Registry class?
# Jul 14th 2017, 11:21 neon1024 I am writing my own collection class, in that I want a class to store a number of things. Can I implement the Cake Collection class for this? So that I can use it’s methods. Is it as simple as just adding my array of class objects to the Collection?
# Jul 14th 2017, 10:21 hmic if you follow convention and new/patchEntity with the relation, that does just work
# Jul 14th 2017, 10:14 josexato @hmic, I want to save a menu entity that has many dishes, I am sending a json Menu{id:1, dishes[{id:1,name:"food1"},{id:2,name:"food2"},{id:3,name:"food3"}...]}
# Jul 14th 2017, 10:09 admad hmic: in 3.next (3.5) you can already used your own pagination class with the paginator component
# Jul 14th 2017, 10:04 dereuromark bottom line: "we could possibly implement an improved sort mapping adjacent to the existing sortWhitelist feature."
# Jul 14th 2017, 10:04 hmic josexato: why not contain the dishes when querying the menus?
# Jul 14th 2017, 10:03 dereuromark => https://github.com/cakephp/cakephp/issues/10028#issuecomment-272812357> - but also see <https://github.com/cakephp/cakephp/issues/7324>, <https://github.com/cakephp/cakephp/pull/9791/files
# Jul 14th 2017, 10:03 hmic at the current state i'd rather remove the paginator from the core (and add it to the app-template only or create the class in the app namespace when used by bake)
# Jul 14th 2017, 10:02 josexato hello, I am sending a json with an array of many elements of an entity (menus hasmany dishes) I am using a for and patch to loadthem is this the best way to load an array or is there one command to load them all directly?
# Jul 14th 2017, 10:02 neon1024 Wow, a four year old ticket
# Jul 14th 2017, 10:02 dereuromark the solution is simple: mappings :slightly_smiling_face: I recommended this many months ago for the paginator rewrite
# Jul 14th 2017, 10:02 hmic feel free to implement and PR!
# Jul 14th 2017, 09:58 johnwayne BUt it would be nice to have.... there was already an Issue on github -> https://github.com/cakephp/cakephp/issues/1957
# Jul 14th 2017, 09:52 hmic stock paginator can't do much like that. it's not difficult to implement though
# Jul 14th 2017, 09:51 johnwayne If one column is empty take another (one is always filled)... or compare 2 and sort etc... :)
# Jul 14th 2017, 09:50 hmic how would you click multiple sort links at once :P
# Jul 14th 2017, 09:50 hmic the paginator cannot sort on multiple columns, sure.
# Jul 14th 2017, 09:49 johnwayne @hmic Thank you, I am using translation for column name... I have tried with array but I am getting error -> ARRAY TO STRING CONVERSION [CORE\SRC\VIEW\HELPER\PAGINATORHELPER.PHP, LINE 437]
# Jul 14th 2017, 09:23 hmic johnwayne: i don't get what the translation should do in there, but you can ->sort([... , ...]) so sort on multiple columns
# Jul 14th 2017, 09:15 johnwayne Is there solution to make ->sort('Table.columnName', __('text')) using 2 columns
# Jul 14th 2017, 09:14 redbeard_ I will try that
# Jul 14th 2017, 09:09 steinkel redbeard_ try switching to redis engine and checking your code is actually caching it
# Jul 14th 2017, 09:08 redbeard_ thanks for responding I am going to debug a little deeper
# Jul 14th 2017, 09:08 redbeard_ I am going to debug the core Cache function than to check where the file is written and if it really does it
# Jul 14th 2017, 09:07 redbeard_ yeah I'm out of ideas too lol - thats why I came begging here lol - this is the very first project I have troubles with this - it almost looks like a server issue
# Jul 14th 2017, 09:07 neon1024 Or maybe you’re looking in the wrong folder. Who knows.
# Jul 14th 2017, 09:06 redbeard_ it returns a true when I return the Cache::write(...) - that is the very strange part
# Jul 14th 2017, 09:06 neon1024 Sorry, I’m out ideas. I bet it’s something very simple though, like permissions or similar.
# Jul 14th 2017, 09:06 neon1024 If the default cache cannot write to the folder, it should be throwing an error
# Jul 14th 2017, 09:06 redbeard_ so the directory is writable but Cache::write(..) never gets on the server
# Jul 14th 2017, 09:05 redbeard_ Yes I specify as a File engine (and a longer duration) also I tried using without the 'foobar' but that also didn't work out. The Models and Persistent dir does contain files
# Jul 14th 2017, 09:04 neon1024 If you change your call to write to use the default cache configuration, is the cache file created?
# Jul 14th 2017, 09:04 neon1024 Does your cache configuration specify the cache engine?
# Jul 14th 2017, 09:03 redbeard_ 3.3.11
# Jul 14th 2017, 09:02 redbeard_ No CakePHP 3
# Jul 14th 2017, 09:02 redbeard_ the directory is created in my tmp dir - but no cache files are written
# Jul 14th 2017, 09:02 neon1024 Is this Cake 2?
# Jul 14th 2017, 09:01 redbeard_ @neon1024 yes.. its like this: 'foobar' => [ 'path' => CACHE . 'foobar']
# Jul 14th 2017, 09:01 redbeard_ It doesn't give errors or something it just never writes it to my server. The dir is all writeable and my config.php is using the correct config