Log message #4198152

# At Username Text
# Aug 15th 2019, 07:05 slackebot findDiscount(Query $query, array $options) { $query ->formatResults(function ($results) ... ``` When I use this `formatResults` in the finder ORM is trying to save `offer` as json object which throws error (offer field varchar 255 exists in the orders table)
# Aug 15th 2019, 07:05 lubos Hey folks, facing interesting problem. there is finder in the `OffersTable` which I want to use with orders associated offer data So I have in the `OrdersController` ``` $this->Orders->find('allCreated') ->contain([ 'Offers' => function($q) { return $q ->find('discount') ... ``` and then the finder `discount` uses `formatResults` ``` public function
# Aug 15th 2019, 06:41 mehov Found my SO answer from some time ago https://stackoverflow.com/a/52179717
# Aug 15th 2019, 06:36 mehov Looks like an overkill now that I typed all this. Seemed like the least wrong way at the time though
# Aug 15th 2019, 06:32 mehov Had the same problem many times I just create a hidden method=post form (incudes all the necessary tokens) and then submit it via AJAX using jQuery.serialize() as request data I have most inputs as type=text, allows them to be edited via Javascript without triggering the form tampering prevention
# Aug 15th 2019, 06:15 jotpe Morning
# Aug 15th 2019, 05:43 spriz Morning everyone! For you guys running multiple web instances seperate from your db (eg. containers): How do you handle migrations that deletes columns in term of the ORM cache? We have removed all usage of the columns, is it safe to just delete it in our DB now?
# Aug 15th 2019, 03:47 kailas getAlias()
# Aug 15th 2019, 03:47 kailas thanks!
# Aug 15th 2019, 03:47 kailas ah, getAlias is it
# Aug 15th 2019, 03:46 zomb woops @kailas spelled your username wrong but ^^^
# Aug 15th 2019, 03:45 zomb @kallas if you want the name of the table in the db, `$this->Orders->getTable()`
# Aug 15th 2019, 03:45 zomb @kallas maybe try `$this->Orders->getAlias()` or `$this->Orders->getRegistryAlias()`
# Aug 15th 2019, 03:41 kailas how can i get the name of the entity for a given table object? for example, in OrdersTable, $this->… would give me “Orders”?
# Aug 15th 2019, 03:40 zomb quick question, is there a method for join/implode on the `Cake\Collection\Collection`
# Aug 15th 2019, 00:35 challgren @pedroseco https://github.com/pronique/multitenant was a good plugin, it hasnt been updated in a while but I used it as a starting point
# Aug 14th 2019, 23:31 pedroseco Hi guys. Im starting to build a SaaS using cakephp as the backend, but i’m a litlle lost on how to configure a multi-tenant app taking into account a different subdomain for each user
# Aug 14th 2019, 20:05 ker Hi, someone try upload multiple image with proffer plugin? I follow the docs but doesn't work. So I have a table of products and another productsphotos and I want add multiple images when I add a new product.
# Aug 14th 2019, 19:48 jh I am also using expose and ports keys
# Aug 14th 2019, 19:48 jh command is --port in docker compose to get the port mapping going
# Aug 14th 2019, 19:36 jh for debugging purposes of cake mail?
# Aug 14th 2019, 19:31 shoe Sorry no :slightly_smiling_face: I use Mandrill or Postmarkapp for relaying mail… so much nicer.
# Aug 14th 2019, 19:28 jh the mailhog config above should work but without smtp it makes no sense
# Aug 14th 2019, 19:28 jh do you happen to have a working smtp server config for docker compose ;)?
# Aug 14th 2019, 19:27 jh https://gist.github.com/inoas/8f6678e4bbe0a7eb949a7cd318dd0487 works now
# Aug 14th 2019, 19:27 jh well i want custom ports so docker and redis have to know about it
# Aug 14th 2019, 19:27 shoe Is it necessary in your docker-compose? Can’t you just specify it in the port section of your app.php config?
# Aug 14th 2019, 19:26 jh aka specifying -p
# Aug 14th 2019, 19:26 jh no idea why
# Aug 14th 2019, 19:26 jh yeah I have been switching that around... but that just doesnt work
# Aug 14th 2019, 19:25 jh which resulted in 2019-08-14T19:21:37.905705399Z 1:C 14 Aug 2019 19:21:37.905 # Fatal error, can't open config file '-p 6379'
# Aug 14th 2019, 19:25 shoe Your error is that it’s trying to open port 6379, not 16379 like your docker-compose file exposes.
# Aug 14th 2019, 19:25 jh shoe that was it I had command: -p 6379 in docker compose
# Aug 14th 2019, 19:23 shoe https://gist.github.com/shoesole/b30b2e764d32e7082c5b19bfc52024d4
# Aug 14th 2019, 19:23 shoe Mine is fairly basic, I’ve got some setup happening in specific Docker files
# Aug 14th 2019, 19:22 jh # Fatal error, can't open config file '-p 6379' okok
# Aug 14th 2019, 19:18 jh @shoe can you share yours
# Aug 14th 2019, 19:14 jh that's my docker compose file
# Aug 14th 2019, 19:13 jh shoe https://gist.github.com/inoas/8f6678e4bbe0a7eb949a7cd318dd0487
# Aug 14th 2019, 19:12 rightscoreanalysis since upgrading to the latest 3.6.x version of cake my json routes no longer work
# Aug 14th 2019, 19:11 jh can you show the docker compose snip