# |
Dec 19th 2017, 15:38 |
hmic |
https://gist.github.com/hmic/ea8b558f0733ce3c8b7b75d9513db300 |
# |
Dec 19th 2017, 15:38 |
hmic |
here's an example: |
# |
Dec 19th 2017, 15:38 |
joop |
now i use foreach to iterate on PatcEntities as Entity |
# |
Dec 19th 2017, 15:38 |
hmic |
i do something similar, i think, not in the controller scope, for an associated entity |
# |
Dec 19th 2017, 15:38 |
hmic |
if you do it before, the data will be available, if not - you get the idea :D |
# |
Dec 19th 2017, 15:37 |
joop |
after PatchEntity |
# |
Dec 19th 2017, 15:37 |
hmic |
so it will be available in $context['data'] too |
# |
Dec 19th 2017, 15:36 |
hmic |
manually, before patchEntities? |
# |
Dec 19th 2017, 15:36 |
joop |
and now if form is submitted i attached that foreig_key for the Entity(ies) |
# |
Dec 19th 2017, 15:35 |
joop |
in the controller there is a patchEntities |
# |
Dec 19th 2017, 15:34 |
hmic |
so where is get generated? |
# |
Dec 19th 2017, 15:34 |
joop |
and for security i didnt want to use hidden field |
# |
Dec 19th 2017, 15:32 |
joop |
thats why i dont pass it for the form |
# |
Dec 19th 2017, 15:32 |
joop |
i come back,that field is not user definied but "calculated" automatically |
# |
Dec 19th 2017, 15:21 |
joop |
thank you |
# |
Dec 19th 2017, 15:21 |
hmic |
you are welcome joop! |
# |
Dec 19th 2017, 15:19 |
joop |
thank you for your help as respecting once again your time and effort |
# |
Dec 19th 2017, 15:19 |
joop |
i meant by the complexity,i manually attached that property in the controller,but mybe i will pass some way for the form |
# |
Dec 19th 2017, 15:18 |
hmic |
joop: the data holds all the data you submitted in your form, no matter how complex ;-) |
# |
Dec 19th 2017, 15:17 |
hmic |
joop: should be $context['data']['review_id'] i suppose |
# |
Dec 19th 2017, 15:17 |
joop |
because it is acomplex,hasMany association |
# |
Dec 19th 2017, 15:17 |
neon1024 |
The file exists and is in the right namespace |
# |
Dec 19th 2017, 15:16 |
neon1024 |
Anyone give me a pointer on why my test is failing with `Cake\ORM\Exception\MissingBehaviorException: Behavior class SluggableBehavior could not be found.` my test plugin is being loaded, but the behaviour isn’t for some reason |
# |
Dec 19th 2017, 15:16 |
joop |
well the main problem is it is not in the form,it is manually attached in the controller |
# |
Dec 19th 2017, 15:16 |
joop |
thank you aro for admit your fault |
# |
Dec 19th 2017, 15:15 |
hmic |
joop: yes. the context holds all the information from the form that got posted. usually includes the id |
# |
Dec 19th 2017, 15:15 |
aro |
my apologies agafin |
# |
Dec 19th 2017, 15:14 |
joop |
hmic would you help me in this https://pastebin.com/efihHFRB |
# |
Dec 19th 2017, 15:14 |
hmic |
aro: thats the reason i got you the info. |
# |
Dec 19th 2017, 15:13 |
megan |
aro thank you for apologising, its a good reminder to everyone to just take a breather every now and then. |
# |
Dec 19th 2017, 15:12 |
dakota |
@aro, remember, cakephp is still php, so if all else fails, fall back to first principles (i.e. figure it out in pure php/pdo) |
# |
Dec 19th 2017, 15:12 |
aro |
hmic i said sorry, I have had a bad day and I let stress get the better of me |
# |
Dec 19th 2017, 15:12 |
megan |
love and hugs to hmic |
# |
Dec 19th 2017, 15:12 |
megan |
hmic.. |
# |
Dec 19th 2017, 15:12 |
hmic |
aro: my last word on the topic, and you can be glad i'm just at the edge of being pissed enough not to help you: https://github.com/cakephp/cakephp/blob/master/src/Database/Driver/Mysql.php#L90-L96 |
# |
Dec 19th 2017, 15:11 |
joop |
would you help me,i detailed in the pastebin file |
# |
Dec 19th 2017, 15:11 |
dakota |
@aro According to http://php.net/manual/en/ref.pdo-mysql.php it should be the file path to the certificate |
# |
Dec 19th 2017, 15:11 |
joop |
my question is still looking for answer |
# |
Dec 19th 2017, 15:10 |
joop |
okey i close that question |
# |
Dec 19th 2017, 15:10 |
megan |
joop - sometimes theres a way to do so, I understand you were trying to assist. |
# |
Dec 19th 2017, 15:09 |
joop |
i respect this community,thats why i warned him to ask help politly and not pushing and needy |