# |
Apr 12th 2019, 20:52 |
ricksaccous |
and you're answer might just be setting them correctly |
# |
Apr 12th 2019, 20:52 |
ricksaccous |
i remember it has config settings though |
# |
Apr 12th 2019, 20:52 |
ricksaccous |
yeah i don't really want to look into what that plugin does right now, lol |
# |
Apr 12th 2019, 20:51 |
ricksaccous |
oh you are messing with that plugin |
# |
Apr 12th 2019, 20:50 |
abdualelah.mdy |
@ricksaccous |
# |
Apr 12th 2019, 20:50 |
abdualelah.mdy |
I deleted all associations. but the issue is the same |
# |
Apr 12th 2019, 20:49 |
slackebot |
Error: [RuntimeException] Cake\ORM\Table association "Users" of type "manyToOne" to "CakeDC\Users\Model\Table\UsersTable" 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\cakep |
# |
Apr 12th 2019, 20:49 |
abdualelah.mdy |
One moment while associations are detected. Exception: Cake\ORM\Table association "Users" of type "manyToOne" to "CakeDC\Users\Model\Table\UsersTable" 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] 2019-04-12 20:48:28 |
# |
Apr 12th 2019, 20:43 |
ricksaccous |
just have to name them differently |
# |
Apr 12th 2019, 20:43 |
ricksaccous |
if you want, you can have both of them, |
# |
Apr 12th 2019, 20:42 |
abdualelah.mdy |
? |
# |
Apr 12th 2019, 20:42 |
abdualelah.mdy |
so i need to keep one of them |
# |
Apr 12th 2019, 20:42 |
ricksaccous |
the first param given to a relationship definer is the association name |
# |
Apr 12th 2019, 20:42 |
ricksaccous |
$this->belongsTo('AssociationName'); |
# |
Apr 12th 2019, 20:41 |
ricksaccous |
you can't do |
# |
Apr 12th 2019, 20:41 |
ricksaccous |
so if you do $this->hasMany('AssociationName'); |
# |
Apr 12th 2019, 20:41 |
ricksaccous |
associations on a table should be uniquely named |
# |
Apr 12th 2019, 20:41 |
ricksaccous |
@abdualelah.mdy basically your association should be named differently |
# |
Apr 12th 2019, 20:40 |
abdualelah.mdy |
any help with this issue ? |
# |
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: |