# |
Jul 12th 2018, 18:13 |
ricksaccous |
which should have the request data fed to it |
# |
Jul 12th 2018, 18:13 |
ricksaccous |
I suppose it's in findAuth |
# |
Jul 12th 2018, 18:09 |
ricksaccous |
is it easy in Authorization to authorize based on associated data? where is the best place to do that? |
# |
Jul 12th 2018, 18:03 |
pmoraes |
both are foreign key to companies |
# |
Jul 12th 2018, 18:03 |
pmoraes |
yes |
# |
Jul 12th 2018, 18:03 |
chris-andre |
both columns are foreign keys for an id in companies table? |
# |
Jul 12th 2018, 18:02 |
pmoraes |
company_id and affiliated_company_id |
# |
Jul 12th 2018, 18:02 |
pmoraes |
Affiliated_companies has |
# |
Jul 12th 2018, 18:02 |
chris-andre |
How does your AffiliatedCompanies table look? |
# |
Jul 12th 2018, 18:01 |
pmoraes |
but this association is companies with companies |
# |
Jul 12th 2018, 18:00 |
chris-andre |
className should be set to the model being associated to. |
# |
Jul 12th 2018, 18:00 |
pmoraes |
yes, its a belongsToMany |
# |
Jul 12th 2018, 17:58 |
chris-andre |
@pmoraes Sure it is a belongToMany assoc. and not a hasMany assoc.? |
# |
Jul 12th 2018, 17:54 |
pmoraes |
anyone knows what I'm missing? |
# |
Jul 12th 2018, 17:54 |
pmoraes |
Column not found: 1054 Unknown column 'company_id' in 'where clause' |
# |
Jul 12th 2018, 17:54 |
pmoraes |
when I try to save I'm having this error |
# |
Jul 12th 2018, 17:53 |
pmoraes |
$company = $this->Companies->patchEntity($company, $this->request->getData(), [ 'associated' => ['AffiliatedCompanies'] ]); |
# |
Jul 12th 2018, 17:53 |
pmoraes |
in my add method |
# |
Jul 12th 2018, 17:53 |
pmoraes |
$this->Form->control('affiliated_companies._ids'); |
# |
Jul 12th 2018, 17:53 |
pmoraes |
in my form I ahve |
# |
Jul 12th 2018, 17:52 |
pmoraes |
$this->belongsToMany('AffiliatedCompanies', [ 'className' => 'Companies', 'bindingKey' => 'company_id', 'targetForeignKey' => 'affiliated_company_id', 'joinTable' => 'affiliated_companies' ]); |
# |
Jul 12th 2018, 17:52 |
pmoraes |
and in the companies table I have that |
# |
Jul 12th 2018, 17:52 |
pmoraes |
affiliated_companies |
# |
Jul 12th 2018, 17:52 |
pmoraes |
I have a new table |
# |
Jul 12th 2018, 17:52 |
pmoraes |
pretty simple |
# |
Jul 12th 2018, 17:52 |
pmoraes |
many affiliated companies |
# |
Jul 12th 2018, 17:52 |
pmoraes |
a company can have |
# |
Jul 12th 2018, 17:52 |
pmoraes |
companies and itself |
# |
Jul 12th 2018, 17:52 |
pmoraes |
I have a belontsToMany relations |
# |
Jul 12th 2018, 17:51 |
pmoraes |
I have an issue maybe a doubt |
# |
Jul 12th 2018, 17:51 |
pmoraes |
hey guys. |
# |
Jul 12th 2018, 17:42 |
chris-andre |
Haha @flavius, Thanks anyway :slightly_smiling_face: |
# |
Jul 12th 2018, 17:40 |
Diego_ |
im sure its using my locale, but not this custom type |
# |
Jul 12th 2018, 17:39 |
Diego_ |
is there something new in cakephp 3.6 about datetime locale format? this custom format does not seem to work anymore: Type::build('datetime')->useLocaleParser()->setLocaleFormat('dd/MM/yyyy HH:mm'); |
# |
Jul 12th 2018, 17:21 |
flavius |
well, i give up :P |
# |
Jul 12th 2018, 17:21 |
chris-andre |
It is set allready |
# |
Jul 12th 2018, 17:20 |
flavius |
try setting 'width' and 'height' in the <img tag |
# |
Jul 12th 2018, 17:18 |
chris-andre |
No. <img /> put into a html-string, then output. |
# |
Jul 12th 2018, 17:17 |
flavius |
https://tcpdf.org/examples/example_009/ |
# |
Jul 12th 2018, 17:17 |
flavius |
are you using `$pdfimg->Image()` function? |
# |
Jul 12th 2018, 17:16 |
chris-andre |
Allready tried full path. Yes, got to be something regarding "real" and "fake" as you mentions. |