# |
Dec 27th 2019, 14:29 |
gianmarxgagliardi |
I solved it like this |
# |
Dec 27th 2019, 14:28 |
peppejaripappalardo |
i check, thx ndm |
# |
Dec 27th 2019, 14:05 |
ndm |
some sort of socket file issue, double check your config |
# |
Dec 27th 2019, 13:57 |
peppejaripappalardo |
Hello to all, someone got this error? ```SQLSTATE[HY000] [2002] No such file or directory``` With native PDO and with workbench i am able to connect into db from remote, but cake generate the error above... Someone have an hint? |
# |
Dec 27th 2019, 13:46 |
gianmarxgagliardi |
@jotpe |
# |
Dec 27th 2019, 13:46 |
gianmarxgagliardi |
if I put clubs it overwrites club_home_id and I had the values available only for club_visitor_id |
# |
Dec 27th 2019, 13:44 |
gianmarxgagliardi |
I need two arrays of values for club_home_id and club_visitor_id |
# |
Dec 27th 2019, 13:43 |
gianmarxgagliardi |
yes i am aware of it |
# |
Dec 27th 2019, 13:41 |
jotpe |
@gianmarxgagliardi your Models are named ClubsHome/ClubsVisitor not Clubs |
# |
Dec 27th 2019, 13:30 |
gianmarxgagliardi |
```$this->hasMany('Matchs', [ 'foreignKey' => 'club_home_id', ]); $this->hasMany('Matchs', [ 'foreignKey' => 'club_visitor_id', ]);``` |
# |
Dec 27th 2019, 13:30 |
gianmarxgagliardi |
in ClubsTable |
# |
Dec 27th 2019, 13:28 |
slackebot |
])``` |
# |
Dec 27th 2019, 13:28 |
gianmarxgagliardi |
```$this->belongsTo('ClubsHome', [ 'className' => 'Clubs', 'foreignKey' => 'club_home_id', 'joinType' => 'INNER', ]); $this->belongsTo('ClubsVisitor', [ 'className' => 'Clubs', 'foreignKey' => 'club_visitor_id', 'joinType' => 'INNER', |
# |
Dec 27th 2019, 13:28 |
gianmarxgagliardi |
in MatchesTable |
# |
Dec 27th 2019, 13:28 |
gianmarxgagliardi |
when i add (in matches controller) it gives me this error: `ExistsIn rule for 'club_home_id' is invalid. 'Clubs' is not associated with 'App\Model\Table\MatchesTable'.` |
# |
Dec 27th 2019, 13:14 |
slackebot |
<ashesh.social> |
# |
Dec 27th 2019, 13:13 |
ashesh.social |
Tried adding mailgun to my project and started following the steps where @challgren posted. Finding a issue while composer require |
# |
Dec 27th 2019, 13:10 |
peppejaripappalardo |
i doing it |
# |
Dec 27th 2019, 12:25 |
dereuromark |
I still didnt publish my 1year old heroku blog post, time to do that now on xmas holidays: https://www.dereuromark.de/2019/12/27/cakephp-and-heroku/ |
# |
Dec 27th 2019, 12:23 |
dereuromark |
or you have a more complex app? |
# |
Dec 27th 2019, 12:05 |
dereuromark |
works fine. |
# |
Dec 27th 2019, 12:05 |
dereuromark |
do you need docker for this? I just deployed a normal app using basic composer commands. |
# |
Dec 27th 2019, 12:02 |
wizardfix |
Using Docker, I mean. :) |
# |
Dec 27th 2019, 11:55 |
wizardfix |
Hi. :) I want to containerise a CakePHP 3.8 application for deployment to Heroku. Can anyone please recommend a good guide / things to look out for? :thinking_face: |
# |
Dec 27th 2019, 11:40 |
gianmarxgagliardi |
thanks it's work |
# |
Dec 27th 2019, 11:38 |
ndm |
not sure if I got the names right, but that's generally how you'd do it |
# |
Dec 27th 2019, 11:38 |
ndm |
You need to contain that association then, and use a dot notated path to access the property, like: ```$this->Matches->SeasonReferees ->find('list', ['keyField' => 'id', 'valueField' => 'referee.full_name']) ->contain('Referees');``` |
# |
Dec 27th 2019, 11:36 |
ndm |
no problem |
# |
Dec 27th 2019, 11:36 |
gianmarxgagliardi |
I'm sorry if I explained myself wrong |
# |
Dec 27th 2019, 11:35 |
gianmarxgagliardi |
exactly |
# |
Dec 27th 2019, 11:35 |
ndm |
So your value fields refer to fields that belong to the entity of an association? |
# |
Dec 27th 2019, 11:34 |
ndm |
I have hard time following your explanations, sorry. It might be easier to show what results you get and what you need (code wise). |
# |
Dec 27th 2019, 11:34 |
gianmarxgagliardi |
'keyField' must have season_referees ID value and valueField name and surname taken from referees |
# |
Dec 27th 2019, 11:32 |
gianmarxgagliardi |
in the sense I could go down to the level of referees getting senzxa problems name and surname but I would not have the correct ID or that of season_referees |
# |
Dec 27th 2019, 11:31 |
ndm |
Your list finder snippet should work fine (no nested array required though), maybe explain what exactly is happening, ie what do the results look like? |
# |
Dec 27th 2019, 11:30 |
gianmarxgagliardi |
sorry I did not understand |
# |
Dec 27th 2019, 11:28 |
gianmarxgagliardi |
i'm using cake 3.8 |
# |
Dec 27th 2019, 11:26 |
steinkel |
https://github.com/cakephp/cakephp/blob/master/src/ORM/Table.php#L1309 this is how find list does it |
# |
Dec 27th 2019, 11:26 |
ndm |
Ackchyually... the list finder already uses a result formatter that combines the fields ;) |
# |
Dec 27th 2019, 11:26 |
steinkel |
try find/formatResults/combine |
# |
Dec 27th 2019, 11:25 |
gianmarxgagliardi |
Undefined property `cognome`. You have not defined the `cognome` association on `App\Model\Table\RefereesTable`. |