Log message #4149284

# At Username Text
# Jun 10th 2018, 08:01 gannher thanks :)
# Jun 10th 2018, 08:00 birdy247 @lorenzo thanks
# Jun 10th 2018, 07:55 lorenzo yes @birdy247
# Jun 10th 2018, 07:55 lorenzo gannher, validation occres when you use newEntity() or parthEntity() not when calling save()
# Jun 10th 2018, 07:55 birdy247 Is that calling that under the hood?
# Jun 10th 2018, 07:54 birdy247 Ah ok
# Jun 10th 2018, 07:54 lorenzo you can then use $this->loadModel()
# Jun 10th 2018, 07:54 lorenzo @birdy247 add the `ModelTrait` to your class
# Jun 10th 2018, 07:52 birdy247 As TableRegistery::get() is depricated, is there a mice way of writing (new TableLocator())->get()
# Jun 10th 2018, 07:14 gannher When i try to validate data by using "$this->Users->save($user))" no error is print, but there is error when i use "$validator->errors($this->request->getData())" in Controller
# Jun 10th 2018, 07:12 gannher validationDefault in model is functionnal in cakephp 3.6 ?
# Jun 10th 2018, 07:09 gannher hello
# Jun 9th 2018, 23:29 josexato nice, thanks
# Jun 9th 2018, 21:25 lorenzo the second argument array will be available in the cusotm finder
# Jun 9th 2018, 21:24 lorenzo `$table->find('customThing', ['extraOption' => $value])`
# Jun 9th 2018, 21:24 lorenzo yeah, in the second argument of find
# Jun 9th 2018, 21:18 josexato @lorenzo thanks, I think that's the approach I'll aim. nevertheless I was wondering if there was a way to pass an argument to a custom finder
# Jun 9th 2018, 21:13 lorenzo you can then do `$submenuTable->find()->contain(‘ChoseDish’, function ($q) { return $q->where([‘available_dish_id’ => ...]); });
# Jun 9th 2018, 21:12 lorenzo thta association looks like a `Submenu belongsToMany ChosenDish`
# Jun 9th 2018, 20:59 josexato i was planing to use a custom finder that receives the ID of the intermediate table `available_dish_id` but I dont know if its possible to pass an argument to the custom finder used in the association "Submenu hasOne ChosenDish"
# Jun 9th 2018, 20:56 josexato I need to implement an association "Submenu hasOne ChosenDish"
# Jun 9th 2018, 20:50 lorenzo @josexato I got lost, what’s your actual requirement?
# Jun 9th 2018, 20:27 josexato File uploaded https://cakesf.slack.com/files/U1QRH4E82/FB4LFTS5R/imagen.png / https://slack-files.com/T053DPNCM-FB4LFTS5R-ed1975b3d0
# Jun 9th 2018, 20:26 josexato I need to load the Submenu->ChosenDish() based in the AvailableDish_id I receive
# Jun 9th 2018, 20:25 josexato my real case is a bit more complicated because it uses an intermediate table SubMenu BelongsToMany Dishes and I am using an intermediate table AvailableDishes
# Jun 9th 2018, 20:20 josexato just as an example
# Jun 9th 2018, 20:20 josexato I would like something like Courses->StudentsWithGradeHigherThan('90')
# Jun 9th 2018, 20:18 josexato for example I have an association Courses has many Students
# Jun 9th 2018, 20:17 lorenzo how are you calling the custom finder in the association?
# Jun 9th 2018, 20:14 josexato in the table class i define the custom finder and the association that will use that finder
# Jun 9th 2018, 20:13 josexato hello how can I pass a variable to a custom finder in an association?
# Jun 9th 2018, 19:52 narendravaghela use double quotes :slightly_smiling_face:
# Jun 9th 2018, 19:51 narendravaghela echo $this->Form->control("comments.$i.comment");
# Jun 9th 2018, 18:48 joopm echo $this->Form->control('comments.$i.comment');//this seems its does not works
# Jun 9th 2018, 18:48 joopm how can i use variable insted of that constant 0 ?
# Jun 9th 2018, 18:48 joopm echo $this->Form->control('comments.0.comment');
# Jun 9th 2018, 18:48 joopm if i need to add multiple elements in form(for HBM assoc)
# Jun 9th 2018, 18:47 joopm hello
# Jun 9th 2018, 09:17 madbbb @lorenzo thank you!
# Jun 9th 2018, 08:43 lorenzo @madbbb you can add a beforeDelete fallback on the fly from your test method that returns false
# Jun 9th 2018, 08:15 birdy247 morning