# |
Nov 7th 2019, 15:31 |
javier.villanueva |
gave_fruits is not a model |
# |
Nov 7th 2019, 15:30 |
dev.cyrusjayson |
no. user_id is foreign key to Gave_Fruits |
# |
Nov 7th 2019, 15:30 |
javier.villanueva |
three tables, fruits, users, fruits_users |
# |
Nov 7th 2019, 15:30 |
javier.villanueva |
its true? |
# |
Nov 7th 2019, 15:30 |
javier.villanueva |
only two models, not three |
# |
Nov 7th 2019, 15:30 |
javier.villanueva |
there are FRUITS AND USERS |
# |
Nov 7th 2019, 15:30 |
javier.villanueva |
and there are not model b |
# |
Nov 7th 2019, 15:29 |
javier.villanueva |
you need belongsToMany assoc |
# |
Nov 7th 2019, 15:29 |
javier.villanueva |
ok then |
# |
Nov 7th 2019, 15:29 |
dev.cyrusjayson |
hhhmmm… im not good at explaining. let me give an example. there are 3 fruits apple, orange, banana I gave apple and orange to user 1 and I want to display all fruits and what fruits I gave to user 1 Fruits Gave Fruits apple apple orange orange banana |
# |
Nov 7th 2019, 15:29 |
javier.villanueva |
IF YES |
# |
Nov 7th 2019, 15:27 |
javier.villanueva |
no, my question is if model b is a MODEL of only a relationship between model A and users |
# |
Nov 7th 2019, 15:27 |
dev.cyrusjayson |
model b could have 2 data from model a but model a always greater |
# |
Nov 7th 2019, 15:26 |
javier.villanueva |
it has more fields than model_a_id, user_id |
# |
Nov 7th 2019, 15:25 |
javier.villanueva |
and do you need model b? |
# |
Nov 7th 2019, 15:24 |
dev.cyrusjayson |
example ```Model A id 1 id 2 id 3 id 4 Model B model_a_id (1), user 1 model_a_id (2), user 1``` The output should be ``` [model_a_1][model_b_model_a_1], [model_a_2][model_b_model_a_2], [model_a_3][], [model_a_4][] ``` something like that. I hope it make sense. I tried ;) |
# |
Nov 7th 2019, 15:21 |
dev.cyrusjayson |
yes and once per user |
# |
Nov 7th 2019, 15:12 |
jotpe |
Does Model B can contain the ID of Model a just once or several times? |
# |
Nov 7th 2019, 15:02 |
dev.cyrusjayson |
I need to discuss this and maybe you guys can share your inputs ```I want to get the data from Model A and Model B Model B will be then compare to Model A id. basically the Model B contain id of Model A Model A Model B id 1 id 1 (matched) id 2 id 2 (matched) id 3 id 4 ``` what will be the association os this? how ti will look like in find/get query |
# |
Nov 7th 2019, 14:26 |
alexdd55976 |
You are welcome |
# |
Nov 7th 2019, 14:25 |
jotpe |
Thanks @alexdd55976 |
# |
Nov 7th 2019, 14:25 |
jotpe |
Which was in Application.php |
# |
Nov 7th 2019, 14:25 |
jotpe |
Yes, must be a plugin |
# |
Nov 7th 2019, 14:23 |
alexdd55976 |
did you revert the application.php to last commit to check if the changes are ok |
# |
Nov 7th 2019, 14:22 |
alexdd55976 |
controllers should not matter |
# |
Nov 7th 2019, 14:22 |
alexdd55976 |
weird |
# |
Nov 7th 2019, 14:22 |
jotpe |
Just crazy that even Cake CLI doesn't work |
# |
Nov 7th 2019, 14:21 |
jotpe |
Composer changes, some new Controllers + change Application.php |
# |
Nov 7th 2019, 14:19 |
alexdd55976 |
HD full? |
# |
Nov 7th 2019, 14:19 |
alexdd55976 |
exisiting application? |
# |
Nov 7th 2019, 14:19 |
alexdd55976 |
how did you ran into it? |
# |
Nov 7th 2019, 14:18 |
jotpe |
Should be the same |
# |
Nov 7th 2019, 14:18 |
alexdd55976 |
path to application |
# |
Nov 7th 2019, 14:17 |
jotpe |
What do you mean with path? |
# |
Nov 7th 2019, 14:17 |
jotpe |
htaccess didn't changed |
# |
Nov 7th 2019, 14:16 |
alexdd55976 |
DB connection |
# |
Nov 7th 2019, 14:16 |
alexdd55976 |
path |
# |
Nov 7th 2019, 14:16 |
alexdd55976 |
htaccess? |
# |
Nov 7th 2019, 14:15 |
jotpe |
Logs don't tell anything :S |
# |
Nov 7th 2019, 14:15 |
jotpe |
What could cause a app not working http 500 and `bin/cake` not working? |
# |
Nov 7th 2019, 13:07 |
dereuromark |
happens sometimes that it responds with timeout/500 or otherwise and next request then is fine again |