# |
Mar 3rd 2018, 22:36 |
obinoob |
savant https://gist.github.com/obinoob/40cb5912ed8be7be87918afd40eb224a |
# |
Mar 3rd 2018, 22:32 |
savant |
each user should have that |
# |
Mar 3rd 2018, 22:30 |
savant |
there should be a `joined_user` or `joined_users` attribute that has the `joined` attribute in it |
# |
Mar 3rd 2018, 22:28 |
savant |
what is the debug output of the users collection |
# |
Mar 3rd 2018, 22:28 |
obinoob |
savant https://gist.github.com/obinoob/40cb5912ed8be7be87918afd40eb224a |
# |
Mar 3rd 2018, 22:06 |
savant |
what is the code you are using now? |
# |
Mar 3rd 2018, 22:05 |
obinoob |
savant it works but I can't add the column 'joined', either way my sql query works perfectly just need to have a orm equivalent |
# |
Mar 3rd 2018, 21:45 |
savant |
yep |
# |
Mar 3rd 2018, 21:44 |
obinoob |
savant should I add the hasOne association to users table? |
# |
Mar 3rd 2018, 21:36 |
savant |
then you can query like you want :slightly_smiling_face: |
# |
Mar 3rd 2018, 21:35 |
savant |
to create a hasOne version of that relation |
# |
Mar 3rd 2018, 21:35 |
savant |
obinoob: use the trick admad showed you yesterday: https://gist.github.com/ADmad/0a451d837f019edf3447 |
# |
Mar 3rd 2018, 21:34 |
obinoob |
savant exactly plus in every user I want to add the joined column |
# |
Mar 3rd 2018, 21:28 |
savant |
okay so you want all users where they have a specific team id? |
# |
Mar 3rd 2018, 21:28 |
obinoob |
savant Error: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'UserTeams.team_id' in 'where clause' |
# |
Mar 3rd 2018, 20:54 |
savant |
what happens when you do that? |
# |
Mar 3rd 2018, 20:54 |
savant |
what isnt working there? |
# |
Mar 3rd 2018, 20:54 |
obinoob |
savant not working for me https://gist.github.com/obinoob/40cb5912ed8be7be87918afd40eb224a |
# |
Mar 3rd 2018, 20:48 |
birdy247 |
@savant I think I will look into that |
# |
Mar 3rd 2018, 20:46 |
savant |
@birdy247 If you have a footprint there, I would def see if you can consult with a lawyer to see what the actual impact upon you is |
# |
Mar 3rd 2018, 20:45 |
birdy247 |
pseudonymisation |
# |
Mar 3rd 2018, 20:45 |
birdy247 |
I am reading up on it |
# |
Mar 3rd 2018, 20:45 |
birdy247 |
ah right |
# |
Mar 3rd 2018, 20:45 |
savant |
obinoob: what about it? |
# |
Mar 3rd 2018, 20:45 |
savant |
@birdy247 what |
# |
Mar 3rd 2018, 20:45 |
obinoob |
birdy247 yes |
# |
Mar 3rd 2018, 20:45 |
birdy247 |
@savant is this freeagent? |
# |
Mar 3rd 2018, 20:44 |
obinoob |
savant look the $id is from teams |
# |
Mar 3rd 2018, 20:44 |
savant |
not in EU, but dealing with GDPR as we have a large-ish footprint over there |
# |
Mar 3rd 2018, 20:44 |
birdy247 |
GDPR... |
# |
Mar 3rd 2018, 20:44 |
birdy247 |
Is anyone in the EU here? |
# |
Mar 3rd 2018, 20:40 |
savant |
obinboob: you can use contain() then on that model instead |
# |
Mar 3rd 2018, 20:39 |
dereuromark |
whats the 3.6 way of parsing a simple URL into its array parts? https://github.com/dereuromark/cakephp-test-helper/blob/master/src/Controller/TestHelperController.php#L38 Didnt quite work out other than with the <3.4 way |
# |
Mar 3rd 2018, 20:38 |
obinoob |
yes |
# |
Mar 3rd 2018, 20:35 |
savant |
do you have a UserTeams model? |
# |
Mar 3rd 2018, 20:33 |
obinoob |
savant if take a look at the result of my fiddle you can see that in each line I've joined column |
# |
Mar 3rd 2018, 20:33 |
savant |
Also, you don’t need to add exclamation points or multiple question marks, we already understand its a question :slightly_smiling_face: |
# |
Mar 3rd 2018, 20:32 |
savant |
obinoob: what do you mean by “add joined to each user collection”? |
# |
Mar 3rd 2018, 20:23 |
obinoob |
is it possible to add joined to each user collection ?!? |
# |
Mar 3rd 2018, 20:22 |
obinoob |
need help to pass the sql query to ORM http://sqlfiddle.com/#!9/808330/3 |
# |
Mar 3rd 2018, 19:08 |
alysson-azevedo |
Ok, |