Log message #4198494

# At Username Text
# Aug 16th 2019, 09:04 admad @koeller by calling $next() first you are setting up the alias after your controller code already run :)
# Aug 16th 2019, 08:44 koeller I would like to set a database connection through this TenantShardMiddleware. I added `$middleware->add(TenantShardMiddleware::class)` to my Application.php. When I debug the code the Middleware class is loaded correctly, but the ConnectionManager::alias won’t take any effect and my Table will always use the default database credentials. Any ideas? Thank you!
# Aug 16th 2019, 07:26 conehead Good morning
# Aug 16th 2019, 07:26 jotpe Hi
# Aug 16th 2019, 02:49 D-rex it didnt solve errors just created more
# Aug 16th 2019, 02:49 D-rex @challgren it wasn't but I did it anyway. I'm not sure why I would need to install it though if I haven't configured anything to use it
# Aug 16th 2019, 02:33 kiwi_58 sdsd
# Aug 16th 2019, 01:13 jslamka5685 The ObjectType database type was exactly what I needed.
# Aug 16th 2019, 01:12 jslamka5685 @dereuromark Took me some time to figure out exactly what I needed to do, but your solution is top notch.
# Aug 15th 2019, 23:11 dereuromark see geo plugin, it uses the same thing
# Aug 15th 2019, 23:10 jslamka5685 How do I go about including a virtual field within a pagination query?
# Aug 15th 2019, 20:13 latenal @admad, it worked! Thanks
# Aug 15th 2019, 20:11 admad same for `Date`
# Aug 15th 2019, 20:11 admad @latenal add `FrozenDate::setJsonEncodeFormat('yyyy-MM-dd')` in bootstrap
# Aug 15th 2019, 20:04 latenal yes
# Aug 15th 2019, 20:03 ricksaccous are you using _serialize?
# Aug 15th 2019, 20:01 latenal Hi, how do I change date format in a json output? I have `index` method that returns dates like this “2019-08-15T00:00:00+00:00”. I would like to remove the time part (in the database this field is DATE not DATETIME)
# Aug 15th 2019, 18:52 jotpe thanks
# Aug 15th 2019, 18:52 jotpe :shuffleparrot:drives me crazy
# Aug 15th 2019, 18:50 ricksaccous it's not using the actual roles table class when you do that though
# Aug 15th 2019, 18:50 challgren did you try find()->where([])->contain()
# Aug 15th 2019, 18:50 ricksaccous yeah because it uses magic
# Aug 15th 2019, 18:50 jotpe o.O
# Aug 15th 2019, 18:50 jotpe Without the contain the find is working without plugin prefix
# Aug 15th 2019, 18:49 ricksaccous oh yeah lol
# Aug 15th 2019, 18:49 ndm I never liked these magic tables
# Aug 15th 2019, 18:49 jotpe Ty :slightly_smiling_face:
# Aug 15th 2019, 18:48 jotpe I know it's gonna hurt @ndm
# Aug 15th 2019, 18:46 ndm @jotpe `->get('Users.Users')`
# Aug 15th 2019, 18:44 jotpe got the same error @ricksaccous
# Aug 15th 2019, 18:43 mrfeedback how to handle massassignments with Authorization plugin? `$collectionparts = $this->Collectionparts->patchEntities($collectionparts,$data); $this->Authorization->can($collectionparts,'update'); ` throws an error ` Error: [Authorization\Policy\Exception\MissingPolicyException] Policy for 'array' has not been defined.`
# Aug 15th 2019, 18:43 slackebot <jotpe>
# Aug 15th 2019, 18:43 slackebot <jotpe>
# Aug 15th 2019, 18:37 jotpe So with a through model you mean create the mdel classes for roles_users?
# Aug 15th 2019, 18:34 ricksaccous and creating that middle man model
# Aug 15th 2019, 18:34 ricksaccous i always like using the through or whatever the option is called though
# Aug 15th 2019, 18:33 ricksaccous so that's why i wanted to see if there's something wrong in your association config there that's breaking things
# Aug 15th 2019, 18:33 ricksaccous it will just assume the join table, and you're following conventions
# Aug 15th 2019, 18:33 jotpe actually it#s a bit strange. it uses mostly the same config as the CMS tutorial: https://book.cakephp.org/3.0/en/quickstart.html#cms-tutorial-creating-the-database
# Aug 15th 2019, 18:32 jotpe just the classname shouldn't work...it uses the join table
# Aug 15th 2019, 18:30 ricksaccous if that doesn't work then maybe create a through model and use the through option as well