Log message #4102254

# At Username Text
# Dec 10th 2017, 14:01 jkpatel291289 templates are generated with bake
# Dec 10th 2017, 14:01 jkpatel291289 i have these lin in may add method
# Dec 10th 2017, 14:00 jkpatel291289 $from_destination_id = $this->Lorryreceipts->FromDestinations->find('list', ['limit' => 200]); $this->set(compact('lorryreceipt', 'companies', 'loadingmemos','from_destination_id'));
# Dec 10th 2017, 13:59 jkpatel291289 thanks. error is gone but now i want to create dropdown in add from to select destinations
# Dec 10th 2017, 13:57 jkpatel291289 ohh
# Dec 10th 2017, 13:57 admad read my example code again
# Dec 10th 2017, 13:56 jkpatel291289 i renamed it to fromDestination but now it is looking for the table from_destinations
# Dec 10th 2017, 13:54 jkpatel291289 @admad sorry. i will create gist from next time :D
# Dec 10th 2017, 13:51 admad you can't have 2 associations with same name. you need to use aliases. ``` $this->belongsTo('FromDestinations', [ 'className' => 'Destinations', 'foreignKey' => 'from_destination_id', 'joinType' => 'INNER' ]); $this->belongsTo('ToDestinations', [ 'className' => 'Destinations', 'foreignKey' => 'to_destination_id', 'joinType' => 'INNER' ]); ```
# Dec 10th 2017, 13:50 admad @jkpatel291289 don't post code in the channel, use gist or pastebin
# Dec 10th 2017, 13:41 slackebot 'foreignKey' => 'to_destination_id', 'joinType' => 'INNER' ]); in destinationstable initialize() method public function initialize(array $config) { parent::initialize($config); $this->setTable('destinations'); $this->setDisplayField('id'); $this->setPrimaryKey('id'); $this->addBehavior('Timestamp'); $this->addBehavior('UseCurrentCompanyOnly'); }
# Dec 10th 2017, 13:41 jkpatel291289 what should be the ideal Association setup for this destinations id city lorryreceipt id from_destination_id to_destination_id blah.. blah.. my current setup is in lorryreceiptstable initialize() method $this->belongsTo('Destinations', [ 'foreignKey' => 'from_destination_id', 'joinType' => 'INNER' ]); $this->belongsTo('Destinations', [
# Dec 10th 2017, 13:19 admad There will be an Authorization plugin for too and together they will replace authcomponent
# Dec 10th 2017, 13:12 bravo-kernel ok, thanks for confirming
# Dec 10th 2017, 13:12 admad @bravo-kernel yes the new authentic plugin includes jwt auth
# Dec 10th 2017, 12:33 bravo-kernel @admad will it be the successor to your jwt-auth lib?
# Dec 10th 2017, 12:32 bravo-kernel Anybody already using https://github.com/cakephp/authentication/ middleware?
# Dec 10th 2017, 11:21 saeideng https://travis-ci.org/cakephp/docs/builds/314274638#L762
# Dec 10th 2017, 11:20 chinpei215 japanese translation team do that sometimes.
# Dec 10th 2017, 11:20 chinpei215 patsuckow: in such cases, I think you can commit an incomplete .rst together, which contains the sections only, like this: https://raw.githubusercontent.com/cakephp/docs/4a4491792f192c83e7783abab81c3c1c6ef69f48/ja/core-libraries/httpclient.rst
# Dec 10th 2017, 11:07 patsuckow Look at somebody: https://github.com/cakephp/docs/pull/5454 - Tell me what I'm doing is not right. The Travis CI build failed indicates that i must first translate another document ?
# Dec 10th 2017, 07:36 patsuckow squalltua, try simply reinstalling the bake utility
# Dec 9th 2017, 16:24 squalltua I try cake console bin/cake bake model users and got error about Exception: Unknown "as_array" filter. please help me
# Dec 9th 2017, 16:23 squalltua Hi
# Dec 9th 2017, 13:23 JD-Robbs (my use case is not something that can be achieved via default value on the database)
# Dec 9th 2017, 13:22 JD-Robbs I wonder what's the best way to initialise entity properties. Should I override the constructor and set it there?
# Dec 9th 2017, 12:47 patsuckow Right! Thank you so much!
# Dec 9th 2017, 12:44 admad 'Products.category_id IN' => $ids
# Dec 9th 2017, 12:41 patsuckow Can somebody help me ?: Why when calling: $products = $this->Products->find()->select(['id', 'title', 'price', 'img'])->where(['Products.category_id' => $ids])->toArray(); an error is displayed: Cannot convert value to integer
# Dec 9th 2017, 12:01 JD-Robbs Awesome, that PR fixes it
# Dec 9th 2017, 12:00 JD-Robbs admad, thanks for the pointer! Had a look and I guess it's this: https://github.com/cakephp/cakephp/pull/11518
# Dec 9th 2017, 11:58 admad JD-Robbs: there's already an issue and PR for it on GitHub
# Dec 9th 2017, 11:56 JD-Robbs I have an issue where debugging is rather unhelpful due to TypeError while the exception renderer expects an Exception. Would anyone know how this can be debugged?
# Dec 9th 2017, 11:36 JD-Robbs saeideng, what I mean is that DebugKit doesn't load its routes "normally". Instead, it requires the routes.php during bootstrap. But this has helped me now as I am now doing the same thing to ensure my routes are available in my middleware.
# Dec 9th 2017, 11:21 patsuckow Hello everybody! Except me, are there developers from Russia?
# Dec 9th 2017, 10:35 saeideng and plugin routes
# Dec 9th 2017, 10:35 saeideng yes
# Dec 9th 2017, 10:11 JD-Robbs Ahaaa! DebugKit loads the routes in bootstrap.php
# Dec 9th 2017, 10:04 saeideng match() for generating urls
# Dec 9th 2017, 10:04 saeideng match() / pars()
# Dec 9th 2017, 10:04 saeideng RouteClass has 2 methods