Log message #4183054

# At Username Text
# Apr 12th 2019, 19:55 abdualelah.mdy @hollistergraham123 3.7
# Apr 12th 2019, 19:52 hollistergraham123 This returns all equipment regardless of wether the location’s equipment has any due maintenance. What am I missing to get it to return only location’s where their associated equipment have maintenance due
# Apr 12th 2019, 19:50 hollistergraham123 I am trying to write a three table deep query. I need the final output to be [locations => [equipments => [maintenances]]]. I just want to return the locations and equipment and maintenance data where maintenance due is between a range
# Apr 12th 2019, 19:44 hollistergraham123 @abdualelah.mdy Which version of cake are you using?
# Apr 12th 2019, 19:04 abdualelah.mdy Exception: Cake\ORM\Table association "Users" of type "manyToOne" to "Cake\ORM\Table" doesn't match the expected class "App\Model\Table\UsersTable". You can't have an association of the same name with a different target "className" option anywhere in your app. in [C:\xampp\htdocs\bookedServer\vendor\cakephp\cakephp\src\ORM\Association.php, line 475]--> full error
# Apr 12th 2019, 19:03 abdualelah.mdy ?
# Apr 12th 2019, 18:56 abdualelah.mdy and how to solve it
# Apr 12th 2019, 18:56 abdualelah.mdy You can't have an association of the same name with a different target "className" . What is the meaning of this
# Apr 12th 2019, 17:22 spencdev Nevermind, doesn't seem like you can access the `expires` field in the session
# Apr 12th 2019, 16:59 spencdev how does everyone else poll without extending the users session expiry?
# Apr 12th 2019, 16:52 spencdev One way I thought would be using `beforeDispatch` and `afterDispatch` if the route matches write the `expires` field the to session, then `afterDispatch` if that exists in the session then update that field in the session to the old expiry time. seems a little overkill though
# Apr 12th 2019, 16:45 spencdev so I switched to database sessions to make this a tad easier to accomplish. Is there a way to not update the `expires` field when a certain route is dispatched?
# Apr 12th 2019, 16:17 abdualelah.mdy thanks
# Apr 12th 2019, 16:17 abdualelah.mdy I restarted the server then it worked
# Apr 12th 2019, 16:14 abdualelah.mdy any ideas ?
# Apr 12th 2019, 16:14 abdualelah.mdy the first 2 routes working without a problem without token .however, the 3rd one is not, I deleted cache but with no success
# Apr 12th 2019, 16:11 slackebot <abdualelah.mdy>
# Apr 12th 2019, 16:11 abdualelah.mdy i am using restApi plugin
# Apr 12th 2019, 16:10 abdualelah.mdy hello
# Apr 12th 2019, 15:48 rogerpro I wonder if there’s a way for Xdebug to stop at any line of a specific file (apart from excluding all files but this one) — is there a more dynamic way to achieve that?
# Apr 12th 2019, 15:24 ricksaccous np
# Apr 12th 2019, 15:24 louisviart Ok, thank's for your help :slightly_smiling_face:
# Apr 12th 2019, 15:22 ricksaccous nesting doesn't change the limited context
# Apr 12th 2019, 15:21 ricksaccous probably passing information to validators would be easier
# Apr 12th 2019, 15:20 louisviart Do you speak about this https://book.cakephp.org/3.0/en/core-libraries/validation.html#nesting-validators ?
# Apr 12th 2019, 15:18 ricksaccous that way you can get the error to display where you want
# Apr 12th 2019, 15:18 ricksaccous so maybe just do that
# Apr 12th 2019, 15:18 ricksaccous before you patch
# Apr 12th 2019, 15:18 ricksaccous or pass options to a validator
# Apr 12th 2019, 15:18 ricksaccous also you can technically pass a context to a validator
# Apr 12th 2019, 15:17 ricksaccous hmmmm
# Apr 12th 2019, 15:17 ricksaccous what you might want is nested validation
# Apr 12th 2019, 15:16 slackebot display on the users_information.X I have tried to add this rule in the UserInformations table but I don't have access in the context to the parent table Users ...
# Apr 12th 2019, 15:16 louisviart I'm trying to solve a problem but I don't know if I'm doing great. I have a User entity wich has one UserInformations that contains a field X This field is in my add / edit form of a user. I would like to perform, conditional validation (https://book.cakephp.org/3.0/en/core-libraries/validation.html#conditional-validation) The problem is that the condition is on the value of the `role` field of the user entity and the message should
# Apr 12th 2019, 15:01 ricksaccous hello
# Apr 12th 2019, 14:56 louisviart Hello everyone
# Apr 12th 2019, 14:56 josbeir yeah as your solution would give a php notice if the key doesn't exist
# Apr 12th 2019, 14:54 neon1024 Hash is a good shout though @josbeir :ok_hand:
# Apr 12th 2019, 14:54 slackebot <neon1024>
# Apr 12th 2019, 14:54 neon1024 Yeah, I went similar
# Apr 12th 2019, 14:45 josbeir @neon1024 $this->assertArrayHasKey('call.features', Hash::flatten(json_decode('{ "call": { "features": "" } }'))); :rolling_on_the_floor_laughing: