Log message #4104433

# At Username Text
# Dec 18th 2017, 10:20 hmic there might be another option, which is use multiple databases by just providing the database name in the table instances tablename like: database.table
# Dec 18th 2017, 10:19 hmic reduce the amount of concurrent php tasks, or up the connection limit accordingly.
# Dec 18th 2017, 10:18 hmic makallio85: if you reach the maximum connection limit on any of these databases, its the same scenario as if you are talking one database.
# Dec 18th 2017, 10:18 hmic so, if you are having too many connections, you need to lower the amount of php instances. thats all.
# Dec 18th 2017, 10:17 makallio85 Not for multiple tables, but for multiple databases
# Dec 18th 2017, 10:17 hmic that would not make much sense anyways, as you want transactions to spawn multiple tables of course and transactions are connection bound.
# Dec 18th 2017, 10:17 hmic makallio85: so far i am concerned, there is only one connection per php instance/request in cake. not multiple ones for multiple tables
# Dec 18th 2017, 10:16 makallio85 I am struggling currently with amount of mysql connections, that are reaching quite fast default limit, when you have sharded database. Currently I am replacing whole connection object in registry, but I was wondering, that I could keep existing connection if I just change table.
# Dec 18th 2017, 10:15 willem if i do some query like this ``` ->where( [ 'OR' => [ 'description LIKE' => '%' . $search_term . '%', ``` does Cake sanitize the search term for me?
# Dec 18th 2017, 10:15 a.francazi ah nice, alrdy found what I needed :slightly_smiling_face:
# Dec 18th 2017, 10:15 qq File uploaded https://cakesf.slack.com/files/U1B977RSB/F8G5DTU12/hi_guys__how_to_do_a_condition_with_contain_option_in_get_function.php / https://slack-files.com/T053DPNCM-F8G5DTU12-6ffeab51e0
# Dec 18th 2017, 10:13 makallio85 Hmm. Is there any reason, why there is no way to alter database table for existing connection object in connection registry? Or is it just something that could be implemented, but is not yet done?
# 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