Log message #4198169

# At Username Text
# Aug 15th 2019, 08:21 admad i really don't see a solution to the problem.. how can you find out even the correct total count since the filtering of records would be done per page
# Aug 15th 2019, 08:18 hmic I am not able to get all the data this virtual field contains in the query/db, it represents external shit.
# Aug 15th 2019, 08:17 admad trying to get proper count after query is done would be PITA
# Aug 15th 2019, 08:17 admad hmic: i believe the best way would be do the filtering in query itself
# Aug 15th 2019, 08:13 hmic I looked into mapReduce but can't figure that (and if it would solve the paginator count issue)
# Aug 15th 2019, 08:12 hmic general question: how to filter results on a virtual field (and get correct counts from the paginator)?
# Aug 15th 2019, 08:11 hmic any ideas?
# Aug 15th 2019, 08:11 hmic I do understand the reason behind it and am looking for another solution now.
# Aug 15th 2019, 08:10 hmic *but* there is a catch on this: the paginator count is wrong
# Aug 15th 2019, 08:10 hmic I could manage to filter the data by utilizing formatResults and returning a new collection with the elements I don't want removed
# Aug 15th 2019, 08:09 hmic Hi, I am facing a problem with a query: I am using virtual fields and I need to filter my result by a virtual field now
# Aug 15th 2019, 07:32 lubos it is too long, but only when i trying to save data which were previously formated via `formatResults` :slightly_smiling_face:
# Aug 15th 2019, 07:28 admad if the db says data is too long for 255 chars than it must be
# Aug 15th 2019, 07:27 lubos hmm, too difficult to explain, however the `formatResutls` is doing something odd :slightly_smiling_face:
# Aug 15th 2019, 07:27 lubos sorry, my bad. when later on i try to save order entity, it throws DB error when I used `formatResults` with related `offer` property. When i skip the `formatResutls` with that `findDiscount` method, all OK
# Aug 15th 2019, 07:10 admad why would a find operation try to save anything?
# 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