Log message #4197672

# At Username Text
# Aug 13th 2019, 09:43 slackebot1 <neon1024>
# Aug 13th 2019, 09:43 challgren Are you just doing integration tests?
# Aug 13th 2019, 09:42 val @challgren the same problem. I need the alias to be applied only to a single subquery.
# Aug 13th 2019, 09:42 neon1024 Probably something like `$t = new TableLocator(); $t->get(‘Cat’, [ ‘className’ => \App\Model\Table\DogsTable::class ])`
# Aug 13th 2019, 09:42 neothermic 0.9% of 500k is still a lot of lines tested
# Aug 13th 2019, 09:42 challgren Damm figured you’d be at least 5%
# Aug 13th 2019, 09:41 neothermic argh, 0.9% covered. gotta keep going to hit that first 1%
# Aug 13th 2019, 09:41 challgren `$Example2 = TableRegistry::getTableLocator()->get('Example')->setAlias('Example2');`
# Aug 13th 2019, 09:41 neon1024 So I guess you’d need to load a new aliased instance
# Aug 13th 2019, 09:40 neon1024 Although as Cake uses the Registry pattern you’ll always be changing the same instance, unless you clone it as @challgren said
# Aug 13th 2019, 09:40 neon1024 `$query->getRepository()->setAlias();`
# Aug 13th 2019, 09:39 challgren Yep not defined.
# Aug 13th 2019, 09:39 val I can't find `setAlias` in Query class
# Aug 13th 2019, 09:39 neon1024 Call it on the query instance instead of the table?
# Aug 13th 2019, 09:37 challgren Try it first and see
# Aug 13th 2019, 09:37 challgren You could clone it
# Aug 13th 2019, 09:36 val not what is needed
# Aug 13th 2019, 09:36 challgren I could see that happening
# Aug 13th 2019, 09:35 val @challgren wouldn't this set 'Example2' alias for all consecutive queries to Example table?
# Aug 13th 2019, 09:35 Martin` When do I need to use Aliasses?
# Aug 13th 2019, 09:34 challgren `$this->Example->setAlias('Example2')->find()`
# Aug 13th 2019, 09:31 val and how a table alias can be set on Query object?
# Aug 13th 2019, 09:12 neon1024 `$newSubQuery = $this->Examples->find()`
# Aug 13th 2019, 09:05 val @admad any example?
# Aug 13th 2019, 08:51 admad Create a separate query instance for the sub query
# Aug 13th 2019, 08:42 val So that the alias would be applied only to that subquery.
# Aug 13th 2019, 08:41 val Hi, what is the safe way to construct a subquery with custom aliases in 3.x?
# Aug 13th 2019, 07:36 neon1024 Hey @jotpe
# Aug 13th 2019, 07:34 jotpe Morning all
# Aug 13th 2019, 06:34 xuanvu442 @admad Thanks bro
# Aug 13th 2019, 05:58 admad @xuanvu442 in cake 3 you can use `bin/cake routes` in CLI to get list of all connected routes, i don't remember if 2.x has the same command
# Aug 13th 2019, 05:10 xuanvu442 Hi everyone! I’ve a small question, hope guys help me. How do I get all the HTTP Request Method available on my project (cakephp 2.x)? Plz see the image!
# Aug 13th 2019, 03:18 challgren Do you have any guide you followed for using AWS?
# Aug 13th 2019, 03:17 claudio Yeah I also checked the code, and looking at AWS it does seem like we don't have cookie stickness enabled, so that might explain the issue. Going to check for the impact in enabling it and then might be the path we take forward. Thanks for the tips :slightly_smiling_face:
# Aug 13th 2019, 03:10 challgren is the webroot different?
# Aug 13th 2019, 03:05 challgren Digging into the code it looks cookie based
# Aug 13th 2019, 02:56 claudio Yeah it's worth the shot, just going to drop a line on the forum to, maybe someone else has some ideas I can try before changing the live server to use database sessions. Thanks for the feedback @challgren
# Aug 13th 2019, 02:54 challgren Id root around in the CsrfComponent and see what its doing there to set it and verify it
# Aug 13th 2019, 02:54 challgren Im not 100% honestly
# Aug 13th 2019, 02:53 claudio component
# Aug 13th 2019, 02:53 challgren Are you using the component or middleware?