Log message #3881761

# At Username Text
# May 27th 2016, 16:26 ypnos nemmons validation takes place during mass-assignment. if you create an empty Entity and then fill some values by-hand it will never kick in (afaik)
# May 27th 2016, 16:25 nemmons if, in a controller, i call `'$this->Table->validator()->notEmpty('some_field');` and then attempt to create and save a new entity without some_field, that won't actually matter, right? because i didn't pass the name of a validator in during my newEntity() call
# May 27th 2016, 16:24 nemmons just to make sure i understand validation in 3.x
# May 27th 2016, 16:20 ypnos lol scrap it
# May 27th 2016, 16:18 max-86666 for the record, ACL are handled the same way :/
# May 27th 2016, 16:17 max-86666 at some point i really like to kill him, i have a lot of weird table in there :)
# May 27th 2016, 16:16 ypnos I'd rather kill the database designer though.. don't forget that the roundtrip etc. you are imposing through this is a real performance killer
# May 27th 2016, 16:15 max-86666 thx ypnos, that seems perfect
# May 27th 2016, 16:15 ypnos In my case I do this for Entities created from a Form that lack the contains because the foreign keys were patched-in after creating the entity
# May 27th 2016, 16:14 ypnos max-86666: you could rewrite the loadContain method to do the fetch
# May 27th 2016, 16:13 ypnos max-86666: this is some code I am having https://gist.github.com/ypnos-web/f2aeb3d7744585fa33c78a1edcb60007
# May 27th 2016, 16:13 styks1987 ajaxLogin needs to be a string? The docs are unclear on how to use isAuthorized with ajax requests that need to respond with 403 instead of the redirect
# May 27th 2016, 16:11 max-86666 i'll try the lsazy load from Entity, thx ypnos
# May 27th 2016, 16:11 sab-cakefest ACTION *brainmelt*
# May 27th 2016, 16:11 max-86666 oh afterfind removed in cake 3 ^^
# May 27th 2016, 16:10 ypnos I would still not do this
# May 27th 2016, 16:10 ypnos max-86666: you can also lazy load an association in the Entity on access. so at that point the Entity could parse its field containing the list to fetch the real objects
# May 27th 2016, 16:09 max-86666 suere, i think i'll use afterfind to parse that comma separated list
# May 27th 2016, 16:08 styks1987 the default looks like a redirect but I want a 401 response
# May 27th 2016, 16:08 nemmons so less magic
# May 27th 2016, 16:08 nemmons you could, of course, still use cake for this. just not a cake association.
# May 27th 2016, 16:08 styks1987 where should I define a custom not authorized request for ajax authorization?
# May 27th 2016, 16:07 ypnos but can't :/
# May 27th 2016, 16:07 ypnos yeah would love to make it easier for you
# May 27th 2016, 16:07 max-86666 i thought the same, but wanted to be sure :)
# May 27th 2016, 16:07 nemmons sorry =(
# May 27th 2016, 16:07 max-86666 well, thx for your advices :)
# May 27th 2016, 16:07 ypnos manifesting your bullshit db in fresh code is IMHO the worst you can do
# May 27th 2016, 16:06 ypnos but it will become a real performance problem
# May 27th 2016, 16:06 max-86666 but i can't :/
# May 27th 2016, 16:06 ypnos and if you can't, maybe you can use SQL functions to build a VIEW that is usable
# May 27th 2016, 16:06 max-86666 can't agreee more
# May 27th 2016, 16:06 nemmons max-86666 sorry but i think what you're trying to do is probably too weird for Cake's ORM
# May 27th 2016, 16:06 ypnos me personally I would suggest you to fix your database
# May 27th 2016, 16:05 max-86666 so, you guys suggest me not to use cake's ORM ?
# May 27th 2016, 16:04 ionas especially if you think about ajax stuff that would do those pulls anway
# May 27th 2016, 16:04 ionas I wonder if a clean implementation of a pull flow instead of push flow and front controller will make things better
# May 27th 2016, 16:04 nemmons np. It's good info to have anyway, i'm sure it will come up for me at some point
# May 27th 2016, 16:04 ionas VzlaCaker: then
# May 27th 2016, 16:04 ionas nemmons true, sorry
# May 27th 2016, 16:03 nemmons @ionas thanks for the info but it was VzlaCaker who was asking