# |
Dec 18th 2017, 10:11 |
a.francazi |
ah ok thx, I'll look into it |
# |
Dec 18th 2017, 10:05 |
dereuromark |
https://book.cakephp.org/3.0/en/orm/validation.html#applying-application-rules |
# |
Dec 18th 2017, 10:05 |
dereuromark |
ideally you have both, DB is the last instance failing hard, but your domain rules in the table class will prevent this hard fail :slightly_smiling_face: |
# |
Dec 18th 2017, 10:04 |
dereuromark |
domain rules |
# |
Dec 18th 2017, 09:59 |
a.francazi |
I have a db-table with composite unique index, to allow only one combination of user_id and post_id (voting-system). So when I'm running the $this->Votes->save() method I get Error: SQLSTATE[23000]: Integrity constraint violation, rather than the save-method returning false. So the SQL-Errror breaks the whole script instead of the save-method returning false and I can't do any error handling. Why's that? |
# |
Dec 18th 2017, 09:30 |
joop |
should i add additional infos? like provider? |
# |
Dec 18th 2017, 09:30 |
joop |
'rule'=>ValidCount('Tests','points'); |
# |
Dec 18th 2017, 09:29 |
joop |
but i get Call to undefined function when try to call it |
# |
Dec 18th 2017, 09:28 |
joop |
i placed my custome rule to the ORM\Rule\Rulename.php |
# |
Dec 18th 2017, 08:59 |
joop |
okey thank you hmic |
# |
Dec 18th 2017, 08:51 |
hmic |
joop: because the ownedbycurrentuser does not know where it is called from |
# |
Dec 18th 2017, 08:46 |
joop |
so if we are in the Battle model why he pass the 'Battle' |
# |
Dec 18th 2017, 08:45 |
joop |
but in this case why he use : $rule = new OwnedByCurrentUser('Battles', $userId); |
# |
Dec 18th 2017, 08:45 |
joop |
my though is in the id field of Battle table |
# |
Dec 18th 2017, 08:44 |
joop |
where he actually use this validation rule |
# |
Dec 18th 2017, 08:44 |
joop |
its not 100% clear |
# |
Dec 18th 2017, 08:44 |
joop |
can someone help me a bit in this tutorial : http://josediazgonzalez.com/2015/12/16/custom-validation-rule-classes/ |
# |
Dec 18th 2017, 08:31 |
adithya |
will do :slightly_smiling_face: |
# |
Dec 18th 2017, 08:31 |
hmic |
but i suggest you create one, if you want dynamic content rendered there |
# |
Dec 18th 2017, 08:31 |
adithya |
thank you, just found it :slightly_smiling_face: |
# |
Dec 18th 2017, 08:30 |
hmic |
its rendered by the pages controller |
# |
Dec 18th 2017, 08:29 |
adithya |
do in need to create a new controller for the home.ctp? because bake commands have not generated any controller for home |
# |
Dec 18th 2017, 08:27 |
hmic |
from a controller |
# |
Dec 18th 2017, 08:27 |
hmic |
pass the data you need in |
# |
Dec 18th 2017, 08:27 |
hmic |
adithya: no. |
# |
Dec 18th 2017, 08:27 |
ono-t |
guten morgen! |
# |
Dec 18th 2017, 08:22 |
adithya |
loadModel() in home.ctp? |
# |
Dec 18th 2017, 08:21 |
adithya |
hi, can i use loadmodels in home.ctp? |
# |
Dec 18th 2017, 08:12 |
hmic |
moin |
# |
Dec 18th 2017, 08:11 |
birdy247 |
morning |
# |
Dec 18th 2017, 07:34 |
joop |
ihope today i find answer to my question |
# |
Dec 18th 2017, 07:23 |
braeden |
^____^ |
# |
Dec 18th 2017, 07:21 |
joop |
have a great day to you |
# |
Dec 18th 2017, 07:16 |
heke |
good morning! |
# |
Dec 18th 2017, 06:37 |
joop |
good morning to all the community members |
# |
Dec 18th 2017, 03:56 |
tukangkod |
spammed? |
# |
Dec 18th 2017, 02:59 |
leadshot |
hi is anyone here ? I have a question about saving an entity in cakephp |
# |
Dec 18th 2017, 02:22 |
l1li4627 |
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ https://www.youtube.com/watch?v=--jYqzJErTI LRH IS LIVE NOW!! CALL 415-349-5666 #LRH EFNETiqiso: AlexMax iqu tapout r0kc4t RNwebdk xvifr ScottO_ hekep arnis Alina-malina jschwartz sitedyno JelmerD hmic juvenal NeoThermic RiPer jantede aro floreo dakotairene one_zero storkovo|away joop nate Martin` orangey |
# |
Dec 18th 2017, 02:22 |
l1li4627 |
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ https://www.youtube.com/watch?v=--jYqzJErTI LRH IS LIVE NOW!! CALL 415-349-5666 #LRH EFNETahdsf: AlexMax r0kc4t one_zero nick337 ScottO_ jschwartz mglinski joepferguson NeoThermic m-takagi_______ nobblywobbly aro frazr sab Sacro dakotairene WyriHaximus juvenal hmic floreo RiPer burzum2 |
# |
Dec 18th 2017, 02:22 |
l1li4627 |
▄▄▄▄▄▄▄▄▄▄ https://www.youtube.com/watch?v=--jYqzJErTI LRH IS LIVE NOW!! CALL 415-349-5666 #LRH EFNETppdutttoij: nick337 ScottO_ ujjain storkovo|away mglinski gadams hekep orangey spexi Alina-malina jschwartz aro arnis godfath3r wouter0100 tapout Werring nobblywobbly burzum2 TheRec frazr juvenal xvifr hmic RNwebdk JelmerD meder_ NeoThermic [Batch] RiPer bigbluehat DV8__ dakotairene jantede Marti |
# |
Dec 18th 2017, 02:22 |
l1li4627 |
▄▄▄▄▄▄▄▄▄▄ https://www.youtube.com/watch?v=--jYqzJErTI LRH IS LIVE NOW!! CALL 415-349-5666 #LRH EFNETgaiobinih: mglinski xvifr [Batch] nick337 dakotairene NeoThermic Sacro juvenal bigbluehat barlas nate one_zero joepferguson Alina-malina joop meder_ m-takagi_______ DV8__ nobblywobbly hekep AlexMax hmic floreo sab r0kc4t spexi RiPer ujjain JelmerD burzum2 gadams tapout sitedyno TheRec Werring wou |