Log message #4157162

# At Username Text
# Jul 10th 2018, 09:00 neon1024 Which means using the belongsTo through UserPermissions becomes really hard
# Jul 10th 2018, 09:00 neon1024 ..and it’s taking that condition for the query
# Jul 10th 2018, 09:00 neon1024 All I can think is that Cake is processing the belongsTo association by running a query for Companies to build the association
# Jul 10th 2018, 08:59 neon1024 Why would the conditions from the UserPermissions table be applied to a query for Companies?!
# Jul 10th 2018, 08:59 neon1024 Which to me, seems totally illogical
# Jul 10th 2018, 08:59 neon1024 However if I uncomment the above conditions in the UserPermissions association, I get a failed query for Companies with a where condition of `['UserPermissions.table_alias' => 'Companies']`
# Jul 10th 2018, 08:58 neon1024 It even uses left join by default
# Jul 10th 2018, 08:58 neon1024 Which is bonkers, as the associations job is to do this work for me
# Jul 10th 2018, 08:58 neon1024 File uploaded https://cakesf.slack.com/files/U1BT622HW/FBMGDTH7E/get_permissions.php / https://slack-files.com/T053DPNCM-FBMGDTH7E-2921bacf64
# Jul 10th 2018, 08:57 neon1024 I’ve had to write manual left joins
# Jul 10th 2018, 08:57 neon1024 If you try and inverse it, Cake goes mental
# Jul 10th 2018, 08:57 neon1024 Now this works fine, if you’re looking for Companies and UserPermissions
# Jul 10th 2018, 08:56 neon1024 File uploaded https://cakesf.slack.com/files/U1BT622HW/FBNR5E31D/polymorphic_association.php / https://slack-files.com/T053DPNCM-FBNR5E31D-aaab10c737
# Jul 10th 2018, 08:56 neon1024 UserPermissions belongsTo Companies, Websites and Campaigns. Using `UserPermissions.table_alias` and `UserPermissions.primary_key`.
# Jul 10th 2018, 08:56 josbeir maybe your conditions includes non aliassed keys, no idea
# Jul 10th 2018, 08:56 neon1024 I am using a polymorphic association
# Jul 10th 2018, 08:55 josbeir it can be a number of things :P
# Jul 10th 2018, 08:55 james.phillips Have you defined the associctaions ?
# Jul 10th 2018, 08:54 josbeir @neon1024 its a bit vague as we don have any context of where the query starts etc
# Jul 10th 2018, 08:54 josbeir but i hadn't had any coffee so its probably me
# Jul 10th 2018, 08:53 josbeir my brain can't grasp your issue
# Jul 10th 2018, 08:51 neon1024 Why is it that if I define conditions in my UserPermissions table, when my code queries for the association, which is Companies. It will use that condition in the Companies query and then fail because the UserPermissions table isn’t joined?
# Jul 10th 2018, 08:34 james.phillips @bravo-kernel Will look at the envolpe stuff next time im looking at swagger thanks. Looking into elastic search now... getting a plan together
# Jul 10th 2018, 07:44 neon1024 Your actual error, is just a missing class. Usually caused by a typo, missing autoload in composer, or similar
# Jul 10th 2018, 07:44 neon1024 If it’s a separate application, perhaps you could write directly to it’s database
# Jul 10th 2018, 07:44 neon1024 If you have the source code, just integrate that into your project
# Jul 10th 2018, 07:43 neon1024 If it exposes it’s api using a web service, just integrate with that
# Jul 10th 2018, 07:43 neon1024 Depends how the CRM software exposes it’s api
# Jul 10th 2018, 07:40 sheraliqureshi.mhtech how to integrate 3rd party (like any crm service ) in cake php? Error: Class 'Sugar\sugarRestClient' not found File E:\xampp\htdocs\corbanone-corbanportal-6c1576bf1fdb\src\Controller\AppController.php Line: 149 i am facing this error for yesterday
# Jul 10th 2018, 07:40 sheraliqureshi.mhtech @neon1024
# Jul 10th 2018, 07:34 neon1024 Morning all
# Jul 10th 2018, 06:53 steinkel in a controller, you can use https://github.com/CakeDC/users/blob/master/src/Controller/Component/UsersAuthComponent.php#L152 passing the url in the event
# Jul 10th 2018, 06:36 sheraliqureshi.mhtech i am facing this error for yesterday
# Jul 10th 2018, 06:35 sheraliqureshi.mhtech Error: Class 'Sugar\sugarRestClient' not found File E:\xampp\htdocs\corbanone-corbanportal-6c1576bf1fdb\src\Controller\AppController.php Line: 149
# Jul 10th 2018, 06:35 sheraliqureshi.mhtech how to integrate 3rd party (like any crm service ) in cake php?
# Jul 10th 2018, 05:08 Mutter Good morning
# Jul 10th 2018, 01:03 graziel @waspinator https://book.cakephp.org/3.0/en/core-libraries/time.html#Cake\I18n\Time::i18nFormat
# Jul 10th 2018, 00:30 waspinator for whatever reason they give different results. `Y` is a year behind
# Jul 10th 2018, 00:29 waspinator what's the difference between `Y` and `yyyy` when it comes to chronos?
# Jul 9th 2018, 21:23 jhob resolved that issue now btw, turns out upgrading breaks lots of things!
# Jul 9th 2018, 19:45 joopm and make a difference with my own source code and the framework codes