Log message #4032429

# At Username Text
# May 25th 2017, 20:15 inoas this is how I proceed now
# May 25th 2017, 20:15 inoas https://gist.github.com/inoas/649a921179fbd160d80c4fc2bfd70876#gistcomment-2106583
# May 25th 2017, 20:13 inoas aka I leave elements, cells, layout as it is cause I am replacing the whole layout with whatever comes from the database (cached as files)
# May 25th 2017, 20:13 WyriHaximus inoas: seen your previous message but you where online when I wanted to reply
# May 25th 2017, 20:13 inoas WyriHaximus: if you are reading this: I made my own SimpleTwigView which overwrides render instead of _render and has a renderTwigTemplate() which does the loadTemplate()->render() call
# May 25th 2017, 19:58 jeremyharris and the entity you pass to save() — the result of patchEntity
# May 25th 2017, 19:58 jeremyharris can you gist the actual newEntity / patching process
# May 25th 2017, 19:58 meder_ this is before
# May 25th 2017, 19:58 jeremyharris ok, is this the entity before or after it is patched?
# May 25th 2017, 19:58 meder_ array merge perhaps
# May 25th 2017, 19:57 meder_ jeremyharris: yeah i wasn't setting it in the entity itself, attachments field. just manually override it? what about appending incase it exists?
# May 25th 2017, 19:57 jeremyharris and then your change wouldn’t have to go into trying a full path, since it’s what would be suggested :slightly_smiling_face:
# May 25th 2017, 19:57 meder_ https://gist.github.com/anonymous/0f5a0c3467764f4bd14fb84ea30fe149
# May 25th 2017, 19:57 jeremyharris yes, that’s what I was thinking
# May 25th 2017, 19:57 chris-andre Right, in the original docs. You want `/full/path/to/root/bin/cake myshell myparam`
# May 25th 2017, 19:56 jeremyharris and then just use the full path in the example, and your change can omit the bit about it since it will be the example
# May 25th 2017, 19:56 jeremyharris right, what I’m saying is we should drop even suggesting cd /path/to andand bin/cake myShell
# May 25th 2017, 19:55 chris-andre In my example, I have the full path as example.
# May 25th 2017, 19:55 jeremyharris nm I’m being lazy, yes it does :slightly_smiling_face: so yeah I would still suggest always using a full path
# May 25th 2017, 19:54 jeremyharris does `php /full/path/to/bin/cake` show the proper paths to your app and cake core?
# May 25th 2017, 19:53 chris-andre Ill comment on GH
# May 25th 2017, 19:53 jeremyharris although nm, that probably won’t work
# May 25th 2017, 19:52 jeremyharris e.g., change the example to the /full/path/to/bin/cake and remove the bit you added about trying the full path
# May 25th 2017, 19:51 jeremyharris @chris-andre probably should be discussed on GH; my point was I don’t think we should even concern ourselves with the bit about CDing into the dir and running the shell like that, and use fully qualified paths instead (even in the existing example)
# May 25th 2017, 19:51 jeremyharris gist your code and I’ll explain
# May 25th 2017, 19:50 jeremyharris the first argument is usually an empty or existing entity you find with get/first
# May 25th 2017, 19:50 jeremyharris meder_ patchEntity returns an entity, which is what you in turn pass to save(). what’s the debug output of that entity
# May 25th 2017, 19:50 meder_ the item i passed, the first argument, no it doesnt have it
# May 25th 2017, 19:49 chris-andre @jeremyharris I saw your comment on my PR. What do you mean by recommending `cd andand bin/cake`? Were you thinking about the paragraph I added? (tell me if you want to keep the conversation on github)
# May 25th 2017, 19:49 meder_ the debug of ->patchEntity?
# May 25th 2017, 19:49 jeremyharris the item you passed to save
# May 25th 2017, 19:49 jeremyharris but what about the result?
# May 25th 2017, 19:49 meder_ but at some point this apparently worked
# May 25th 2017, 19:48 meder_ not the first
# May 25th 2017, 19:48 meder_ the second parameter, request data does
# May 25th 2017, 19:47 jeremyharris does the patched entity contain the hasMany entities within it?
# May 25th 2017, 19:47 meder_ how can I debug a patchEntity call where the associated data isn't being inserted into a hasMany table, even though 'associated' specifies that?
# May 25th 2017, 19:04 steinkel @igreat just in case you are still playing around, here is a full example extending the controller and creating a custom register action > https://ide.c9.io/steinkel/users-34-extended-controller
# May 25th 2017, 18:45 atomCode yep, thanks!
# May 25th 2017, 18:45 jeremyharris yeah, that’s what saveMany does anyway. wrap it in a transaction and you should be good
# May 25th 2017, 18:44 atomCode I guess the only way is to iterate through each record and do a saveAssociated