Log message #4020025

# At Username Text
# Apr 25th 2017, 17:36 ypnos in newest cakephp, isDirty() to check, setDirty() to set
# Apr 25th 2017, 17:34 adityapansari Hey, alternative for dirty() function ? I also want to access the dirty value after saving the entity.
# Apr 25th 2017, 17:32 chris-andre I forgot about saveMany(), so I will probably use that method.
# Apr 25th 2017, 17:31 chris-andre Quite simple change. I tested something similar, if `save()` failed, but it didn't give me the result I expected. I probably did something wrong.
# Apr 25th 2017, 17:29 chris-andre Okay. Thanks for looking at it ;) I'll read your comment on my gist ;)
# Apr 25th 2017, 17:26 ypnos with comment I meant a comment on your gist :)
# Apr 25th 2017, 17:25 ypnos see https://book.cakephp.org/3.0/en/orm/saving-data.html#saving-multiple-entities
# Apr 25th 2017, 17:25 ypnos but for your simple use case, you should use saveMany()
# Apr 25th 2017, 17:24 ypnos as I said, you need to propagate the negative result of save() so that transactional() can act upon the failure and rollback the transaction
# Apr 25th 2017, 17:23 ypnos I made a comment on how to fix the code
# Apr 25th 2017, 17:22 chris-andre Sure.
# Apr 25th 2017, 17:22 ypnos do some googling on xdebug php :)
# Apr 25th 2017, 17:22 chris-andre xdebug(): call to undefined method.
# Apr 25th 2017, 17:21 chris-andre Allright, doesn't get it. Here my method: https://gist.github.com/chris-andre/af7981db40095016c815800e1c56b15c
# Apr 25th 2017, 17:17 ypnos you can use xdebug
# Apr 25th 2017, 17:17 chris-andre ?
# Apr 25th 2017, 17:17 chris-andre Sorry for asking stupidly, but what do I do to debug my callback
# Apr 25th 2017, 17:15 ypnos_ saving entities with an error fails and returns false, but you need to propagate it in the callback
# Apr 25th 2017, 17:15 chris-andre I thought the transaction would fail if any entity has an error, but it doesn't.
# Apr 25th 2017, 17:15 ypnos_ how does your callback look like? maybe show a gist?
# Apr 25th 2017, 17:14 chris-andre Maybe I just haven't been able to make the transaction fail.
# Apr 25th 2017, 17:13 ypnos_ chris-andre where does the failure happen then? you need to check the results of operations within your callback or propagate the return value, e.g. save() returns false on failure
# Apr 25th 2017, 17:11 chris-andre @ypnos_ It looks like it return `null` regardless
# Apr 25th 2017, 17:10 ypnos_ chris-andre catch exceptions and also check the return value of transactional() for false, both means not successful. https://api.cakephp.org/3.0/class-Cake.Database.Connection.html#_transactional
# Apr 25th 2017, 16:21 chris-andre Hello! Is it a way to check if a `$table->connection()->transactial()` is successful or not?
# Apr 25th 2017, 15:59 awi The file uploader somehow falls with Hash::get receiving anything but an array or arrayaccess
# Apr 25th 2017, 15:57 awi Maybe someone can help me with this one: https://github.com/FriendsOfCake/cakephp-upload
# Apr 25th 2017, 15:48 awi hi. is josegonzalez somewhere around?
# Apr 25th 2017, 15:16 inoas though I liked the Session Containers
# Apr 25th 2017, 15:15 inoas I had to work with ZF2 this week... horrible :(
# Apr 25th 2017, 15:15 inoas I am pretty sure we could be more strict, not sure if it would be overall better though ;)
# Apr 25th 2017, 15:15 inoas just imagine we had no auto tables, no auto entities, accessible being set to default, fieldLists always required, CSRF always on, http disallowed (only https) etc ;P
# Apr 25th 2017, 15:14 inoas however that guy... no comment ;)
# Apr 25th 2017, 15:14 inoas sadly I don't use reddit. I do think full-fledge frameworks give you a false sense of security unless they make it very hard to work with them :P
# Apr 25th 2017, 15:14 inoas sad,,
# Apr 25th 2017, 15:13 dereuromark hehe
# Apr 25th 2017, 15:12 inoas I mean in the worst hellhole of spaghetti-code it can't take you days to add a link
# Apr 25th 2017, 15:12 inoas haha that guy is FOS :E
# Apr 25th 2017, 15:12 inoas "One of my early tasks was to … add a link to something on some page. It took me few days to add this stupid link. Why?"
# Apr 25th 2017, 15:12 inoas dereuromak
# Apr 25th 2017, 15:00 julez thank you