Log message #3880347

# At Username Text
# May 25th 2016, 22:47 LACabeza phpcoder you need join sectors and agent_sectors
# May 25th 2016, 21:46 phpcoder *well
# May 25th 2016, 21:46 phpcoder guys cake returns this query https://gist.github.com/anonymous/7ff67a7838792aeb584bc70e78b66329 it works but why does it use 1 = 1 here https://gist.github.com/anonymous/7ff67a7838792aeb584bc70e78b66329#file-test-sql-L67 it does not look very good
# May 25th 2016, 21:25 LACabeza nevermind, i found the anwser on docs
# May 25th 2016, 21:24 LACabeza hi! do i need to create templates on a json webservice?
# May 25th 2016, 20:49 hekep !logs
# May 25th 2016, 20:37 jefazos anyone around?
# May 25th 2016, 20:37 jefazos hello
# May 25th 2016, 20:18 jefazos is there anyone here?
# May 25th 2016, 20:17 jefazos if someone is open to help
# May 25th 2016, 20:17 jefazos I need some help in finding the correct way to add a functionality to my app
# May 25th 2016, 20:10 Eax Hey folks! Cake3 question: I have this LoginController: https://gist.github.com/eaxexe/64442df2e6465a67fe7a0fcd98ad27f7 (It uses Facebook to auth the login, hence no password checking) - My question is: Can anyone see why the cookie simply dissapears after being set and the user being redirected? Thanks! ð???
# May 25th 2016, 19:00 bravo-kernel thanks again for the framework guys, enjoy the fest
# May 25th 2016, 18:59 slackebot Action: bravo-kernel gives everybody NL hugs, just because
# May 25th 2016, 18:30 ionas anyone wants to go out and have a bite and resides near to the conference place?
# May 25th 2016, 17:57 a.barclay will do, thanks for the help guys :slightly_smiling_face:
# May 25th 2016, 17:57 nrother try removing unnecessary columns, so its easy to see the interesting things in the query ;)
# May 25th 2016, 17:57 a.barclay Maybe the SQL example will help them see it's an issue, because that seems to be generated entirely by Paginator rather than any query I'm doing
# May 25th 2016, 17:56 a.barclay Yeah that might be worth doing, though I can't see how I can make it simpler, there's only 3 models and 2 joins
# May 25th 2016, 17:55 nrother you could try to create a simple example so its easier to see that there is actually a bug.
# May 25th 2016, 17:54 a.barclay but I can't see any missing associations / joins
# May 25th 2016, 17:53 a.barclay I was told "You'll have to sort out the missing associations/joins. That isn't a bug with CakePHP"
# May 25th 2016, 17:53 a.barclay I tried filing a bug on GitHub and it was rejected
# May 25th 2016, 17:53 nemmons Maybe posting this SQL to the thread you started will help other more experienced people see the issue more clearly?
# May 25th 2016, 17:53 a.barclay Neither have I, but for this particular application it would be helpful to have that restriction in the model
# May 25th 2016, 17:53 nemmons Sorry i can't be more help than that =\
# May 25th 2016, 17:53 nrother you can try filing a bug on github, maybe someone with more experience of the internals can help
# May 25th 2016, 17:52 a.barclay Yeah.
# May 25th 2016, 17:52 nemmons but i've never tried to paginate on a model containing an association defined by a custom finder, so there's a lot going on here
# May 25th 2016, 17:52 nemmons There doesn't seem to be anything obviously wrong here
# May 25th 2016, 17:52 a.barclay hehe, that's true :slightly_smiling_face:
# May 25th 2016, 17:52 nemmons *course
# May 25th 2016, 17:52 nemmons much easier said that done, of courese
# May 25th 2016, 17:51 nemmons so the best advice that I could give would be to dig into CakePHP and try to understand exactly how the SQL is being constructed and whether it's possible to influence the order of the joins
# May 25th 2016, 17:51 a.barclay Looks like it, yeah.
# May 25th 2016, 17:51 nemmons So the problem is that the SQL is being generated in such a way that the order of the joins is 'incorrect' (meaning that it leads to a query that doesn't work)
# May 25th 2016, 17:49 a.barclay and this only seems to error when paginating. For instance, if I go to /jobs/add, in the "Account Manager" drop down I only get users who have the User Type "Account Manager"
# May 25th 2016, 17:48 a.barclay But obviously "Account Managers" is a aliased association with a custom finder, so I'm wondering if something there is messing it up.
# May 25th 2016, 17:47 a.barclay Yeah, I'm just not sure where in my code I've gone wrong. As far as I'm aware, the association between Users and UserTypes is correct.
# May 25th 2016, 17:45 nemmons i guess it's supposed to be inner joining UserTypes first
# May 25th 2016, 17:45 a.barclay yeah I just noticed that too