Log message #4098877

# At Username Text
# Nov 27th 2017, 19:27 arnis hi, guys. Anyone awake? :) advice wanted. So, I have such an code fragment - https://gist.github.com/arneefreeman/ea2f018a78c2097fc608d1b82ef19008 I'm wondering if I could somehow include products count in my $attributes (via $query->func()->count() maybe?) ? Products belongsToMany attributeValues, attributeValues belongsTo attributes.
# Nov 27th 2017, 19:13 ravage84 Is there another way for getting the full list of columns with their schema data out of TableSchema apart from first getting the list of column names through https://api.cakephp.org/3.5/class-Cake.Database.Schema.TableSchema.html#_columns and then iterate over them by using https://api.cakephp.org/3.5/class-Cake.Database.Schema.TableSchema.html#_getColumn ?
# Nov 27th 2017, 18:53 casmo fieldlist seems good
# Nov 27th 2017, 18:53 casmo Allright
# Nov 27th 2017, 18:51 dereuromark or both work together: validator sets the required fields, and the entity patching only inputs what is expected (by whitelisting and ignoring the rest)
# Nov 27th 2017, 18:50 dereuromark but also inside each validator as requirePresence() etc
# Nov 27th 2017, 18:50 dereuromark usually on patchEntity() or newEntity(), yeah
# Nov 27th 2017, 18:48 casmo I saw this: https://book.cakephp.org/3.0/en/core-libraries/validation.html#requiring-field-presence but putting it to "false" doesn't work
# Nov 27th 2017, 18:46 casmo Yeah, but fieldList is in my controller, right?
# Nov 27th 2017, 18:46 dereuromark see fieldList option and whitelisting in general (as opposed to blacklisting)
# Nov 27th 2017, 18:45 dereuromark rest will simply be ignored, thats the best practice.
# Nov 27th 2017, 18:45 dereuromark most dont check on what is not supposed to be preset, but rather the opposite :slightly_smiling_face:
# Nov 27th 2017, 18:44 casmo E.g. in validationProfile() to check if the field "role" is not presencent?
# Nov 27th 2017, 18:43 casmo Is the validationDefault (or validationCustom) the best place to check if fields are posted that are not be supposed to update?
# Nov 27th 2017, 18:30 dereuromark jep
# Nov 27th 2017, 18:23 casmo If it really doesn't do what you want it to do, you can always override the action
# Nov 27th 2017, 18:22 casmo For whatever reason
# Nov 27th 2017, 18:22 casmo I always find myself coming back to the Crud plugin
# Nov 27th 2017, 18:19 dereuromark if crud works it should be preferred as it upgrades for free usually :slightly_smiling_face: no code to maintain. but customization is harder (callbacks and other tricks, also some limitations here).
# Nov 27th 2017, 18:14 casmo It is a pretty decent description
# Nov 27th 2017, 18:05 dereuromark forever=real files to persist and use, fly=dynamic, no real files usually
# Nov 27th 2017, 18:04 dereuromark one generates it forever, the other on the fly
# Nov 27th 2017, 17:58 goldiman what's the difference between bake and crud ? :)
# Nov 27th 2017, 17:58 goldiman Hi
# Nov 27th 2017, 17:25 GuillaumeP Thank you dereuromark !
# Nov 27th 2017, 17:23 dereuromark "^x.y" to be precise
# Nov 27th 2017, 17:23 dereuromark or specicy the version with ...:"x.y" as documented in composer
# Nov 27th 2017, 17:23 dereuromark it will auto set the latest minor
# Nov 27th 2017, 17:22 dereuromark composer require cakephp/cakephp will do the trick :slightly_smiling_face:
# Nov 27th 2017, 17:22 GuillaumeP Hi guys, when I run composer update, cakephp is updated to 3.3.16 - how should I do to update to 3.4 via composer ?
# Nov 27th 2017, 14:48 tywe another newby looking for tips for LDAP auth with cake 2.X anyone with some experience in this that have a couple minutes for my case? :)
# Nov 27th 2017, 14:48 tywe Hi
# Nov 27th 2017, 13:54 obinoob neon1024: thank you :)
# Nov 27th 2017, 13:07 justcharlz @neon1024, been able to run composer install and checked the debugkit panel, all seems to be working ok but not yet working as I am getting permission issue. Any other suggestion.
# Nov 27th 2017, 12:57 saeideng primary key ...
# Nov 27th 2017, 12:56 saeideng I found
# Nov 27th 2017, 12:53 saeideng why?
# Nov 27th 2017, 12:53 saeideng ``` protected $_accessible = [ 'id' => true, ```
# Nov 27th 2017, 12:53 saeideng makes entity
# Nov 27th 2017, 12:52 saeideng bake model ...
# Nov 27th 2017, 12:36 neon1024 If it was part of MySQL schema, you’d have to read the value first, store it, then re-insert it with the update