# |
Apr 29th 2017, 11:39 |
saeideng |
i can send image to server but |
# |
Apr 29th 2017, 11:38 |
saeideng |
//$validator //->requirePresence('image', 'create') //->notEmpty('image') // ; |
# |
Apr 29th 2017, 11:37 |
saeideng |
i want to disable validator empty for image input |
# |
Apr 29th 2017, 11:20 |
metoyoko |
Hi @admad is setTable and className are the same? thanks |
# |
Apr 29th 2017, 11:18 |
metoyoko |
@dereuromark thanks |
# |
Apr 29th 2017, 11:16 |
loginews |
sorry... I can't help being a grumpy old man! brb |
# |
Apr 29th 2017, 11:14 |
admad |
If the 2 are not associated in any way then there's no business modifying those values together. Unless there's some association between the 2 models ORM can't save them in a single save() call. |
# |
Apr 29th 2017, 11:13 |
loginews |
@admad in fact the 2 tables are not linked in any way! I created a link to please Cake !!! :slightly_smiling_face: |
# |
Apr 29th 2017, 11:11 |
loginews |
I will go and correct that and come back asap. |
# |
Apr 29th 2017, 11:11 |
loginews |
no... let me explain. Param contains standard parameters, (a single record) and I want (for instance) to allow the user to change his own parameters, and also some system parameters at the same time. I don't want to create two input screens for that, one for the user's profile parameters, and another for the overall system parameters. Users don't understand systems. |
# |
Apr 29th 2017, 11:08 |
admad |
Are you sure you need Users belongsTo Params? I would have guess a user has multiple params hence Users hasMany Params |
# |
Apr 29th 2017, 11:08 |
loginews |
ok... let me try to correct that. |
# |
Apr 29th 2017, 11:08 |
admad |
Since your db table isn't plural as per convention just use $this->setTable('param'); in the ParamsTable class. |
# |
Apr 29th 2017, 11:07 |
admad |
it is kinda. But model names start with caps, so should be "Params" and also the model name should be plural as per conventions |
# |
Apr 29th 2017, 11:05 |
loginews |
is this not an association? $this->belongsTo('param')->setForeignKey('id')->setProperty('param_id'); |
# |
Apr 29th 2017, 11:04 |
loginews |
let me check |
# |
Apr 29th 2017, 11:04 |
loginews |
hmm |
# |
Apr 29th 2017, 11:03 |
admad |
@loginews you have not set any association between UsersTable and ParamsTable, that the first prerequisite for being able to save params associated with a user. |
# |
Apr 29th 2017, 10:58 |
dereuromark |
someone could also easily implement some examples into the sandbox. |
# |
Apr 29th 2017, 10:57 |
dereuromark |
@metoyoko maybe in the bookmarker? https://github.com/FriendsOfCake/awesome-cakephp#demo |
# |
Apr 29th 2017, 10:54 |
admad |
right |
# |
Apr 29th 2017, 10:54 |
dereuromark |
ok, maybe for 4.x then |
# |
Apr 29th 2017, 10:53 |
admad |
@dereuromark i wasn't planning on removing any deprecated methods yet. Doing so would require first updating crud's SearchListener among other things. |
# |
Apr 29th 2017, 10:50 |
metoyoko |
is there any downloadable sample dealing with belongsToMany association? thanks |
# |
Apr 29th 2017, 10:46 |
metoyoko |
thanks, I found this active Cakephp community |
# |
Apr 29th 2017, 10:46 |
loginews |
@dakota would you mind looking at the gist issue ? |
# |
Apr 29th 2017, 10:44 |
dereuromark |
before releasing 3.0.1? |
# |
Apr 29th 2017, 10:44 |
dereuromark |
@admad While we are at it regarding search major: "mode (string, defaults to OR) This option is deprecated, please use fieldMode instead." Can we get rid of the old stuff that is deprecated as well? |
# |
Apr 29th 2017, 10:43 |
loginews |
ok |
# |
Apr 29th 2017, 10:43 |
dakota |
http://cakephp.loginonline.net/index.php?n=Index.ComboBoxes> <- Instead of that do: <https://book.cakephp.org/3.0/en/orm/retrieving-data-and-resultsets.html#finding-key-value-pairs |
# |
Apr 29th 2017, 10:41 |
loginews |
so are we now fighting ? :) |
# |
Apr 29th 2017, 10:40 |
dakota |
@loginews Try doing that with a VB6 app that was originally based on a COBAL app :slightly_smiling_face: |
# |
Apr 29th 2017, 10:40 |
admad |
Makes you sound like a grumpy old man who wants to stick to the old ways |
# |
Apr 29th 2017, 10:39 |
loginews |
@dakota got it. I will drop $_SERVER slowly. The apps have to stay running all the time I change the platform..! so hard. |
# |
Apr 29th 2017, 10:39 |
admad |
It's surprising that someone with so much dev experience is complaining about learning something new because the world dynamics have changed |
# |
Apr 29th 2017, 10:37 |
dakota |
I understand fully, BUT don’t use $_SERVER, etc. and use the tools that the framework gives you. CakePHP is designed in such a way that you do not need to follow the conventions |
# |
Apr 29th 2017, 10:36 |
slackebot1 |
right now: https://gist.github.com/loginews/78dbc099fe1689332c299002d361f472 there are no errors, but the EDIT in userparams.ctp does not save the data in param.ADDRESS1. |
# |
Apr 29th 2017, 10:36 |
loginews |
@dakota... if you read what I sent to admad above, my terrible difficulty is that all my apps are already running in MsAccess (but with mysql databases) and I need to drop MsAccess gradually and replace it with php. So... what happens is this: I cannot change my database structure, and hence cannot comply with CakePHP naming conventions. Even so, I have the doctor's system completely running under cakephp and that is a good beginning. I hav |
# |
Apr 29th 2017, 10:36 |
dakota |
@loginews The equivilent is `$this->request->getQuery('page')`, or `$this->request->getQuery('q')`, etc. |
# |
Apr 29th 2017, 10:35 |
admad |
Since you have only dealt with Windows deaktop environment no wonder using linux based server environment involves a learning curve for you |
# |
Apr 29th 2017, 10:34 |
dakota |
That is what the request object is for |