Log message #4124427

# At Username Text
# Mar 12th 2018, 21:53 xinobi savant you asked me to show you the query error so i've had to change to 'select' in order to get all the registries including the ones with missing emails or addresses etc
# Mar 12th 2018, 21:53 savant be back in an hour
# Mar 12th 2018, 21:53 savant headed out to lunch
# Mar 12th 2018, 21:52 savant since your query appears to me that its doing a select instead.
# Mar 12th 2018, 21:52 savant are you sure you left the `UserEmails` strategy and joinType to what you showed in the pastebin?
# Mar 12th 2018, 21:51 xinobi savant don't follow the url
# Mar 12th 2018, 21:50 xinobi savant no that :id param is being passed on... this is the url: http://sandbox.lc/teams/users/1?sort=UserAddresses.addressanddirection=asc
# Mar 12th 2018, 21:48 savant so if there is no JoinedTeam, then it wont show up
# Mar 12th 2018, 21:48 savant so thats because you are setting team_id to something
# Mar 12th 2018, 21:47 xinobi savant this is the query https://pastebin.com/1hhK3MjY
# Mar 12th 2018, 21:39 savant can you show me the query you are seeing
# Mar 12th 2018, 21:39 savant and leave the joinType as it was
# Mar 12th 2018, 21:39 savant leave it as join
# Mar 12th 2018, 21:39 savant do not use select
# Mar 12th 2018, 21:39 xinobi savant if i choose to use setStrategy('select') than I can see all users but i'm not allowed to sort associated data, I get a mysql error for unknown column (the one I sort) etc
# Mar 12th 2018, 21:38 savant what is the database query executed here?
# Mar 12th 2018, 21:36 xinobi savant with the current setup the users without email, address or phone joined to a team won't get listed but I'm able to sort my data without problems
# Mar 12th 2018, 21:35 savant or rather, what is happening and what do you want to happen?
# Mar 12th 2018, 21:34 savant and what is the error you are seeing?
# Mar 12th 2018, 21:33 xinobi savant my controller action https://pastebin.com/5nkEH2c5
# Mar 12th 2018, 21:31 savant can you show me the query that you are using?
# Mar 12th 2018, 21:26 xinobi savant this is my Table code https://pastebin.com/jmMZvibg
# Mar 12th 2018, 20:52 savant can you show the code you are using? via a gist please
# Mar 12th 2018, 20:52 savant what is a “registries’
# Mar 12th 2018, 20:51 savant which is the default
# Mar 12th 2018, 20:51 savant that will then mean you use a `join` strategy of `LEFT` joinType
# Mar 12th 2018, 20:51 savant do not change to select
# Mar 12th 2018, 20:51 savant leave the strategy as is
# Mar 12th 2018, 20:51 savant you can sort by a LEFT column
# Mar 12th 2018, 20:50 xinobi savant I can't find a proper solution, I've opened this https://discourse.cakephp.org/t/sort-from-view-with-when-using-hasone-associations/3976 a "while" ago I stoped looking for a solution meanwhile but now I need to fix this
# Mar 12th 2018, 20:46 xinobi savant I'm sorry but I'm really frustrated here
# Mar 12th 2018, 20:45 xinobi savant by default joinType is LEFT
# Mar 12th 2018, 20:45 savant :slightly_smiling_face:
# Mar 12th 2018, 20:45 savant also, there isnt any need for a bunch of !?!!?1
# Mar 12th 2018, 20:45 savant xinobi: you can change the `joinType` to `LEFT` if you’d like
# Mar 12th 2018, 20:44 xinobi I'm sorry to get back to this but the book says "You can use INNER if your hasOne association is always present." what if it's not an obligatory column?!? has I see it I got only one option I've to use 'select' as strategy but I can't sort data... https://book.cakephp.org/3.0/en/orm/associations.html#hasone-associations
# Mar 12th 2018, 20:01 xinobi when sorting hasOne associations within pagination I don't see all the registries, but if I add setStrategy('select') I get an all the registries however I'm allowed to sort without a MYSQL Error: SQLSTATE[42S22]: Column not found: 1054 Unknown column...
# Mar 12th 2018, 19:22 bakro.istvan I will get back at you if I find anything
# Mar 12th 2018, 19:22 bakro.istvan Thanky anyway
# Mar 12th 2018, 19:22 bakro.istvan ok
# Mar 12th 2018, 19:21 dereuromark Find out why. It works for me.