Log message #4099045

# At Username Text
# Nov 28th 2017, 14:34 obinoob nice but not sure how multiple entities should fit in... I see an array of entities I believe I must push each one to an array etc?!?
# Nov 28th 2017, 14:32 neon1024 I’m not overly familiar as I don’t use it :slightly_smiling_face:
# Nov 28th 2017, 14:32 neon1024 There is `->transactional()`
# Nov 28th 2017, 14:32 obinoob yes it does https://api.cakephp.org/3.1/class-Cake.Database.Connection.html#_commit
# Nov 28th 2017, 14:32 neon1024 https://book.cakephp.org/3.0/en/orm/saving-data.html#converting-multiple-records
# Nov 28th 2017, 14:31 obinoob perhaps commit returns some bolean value
# Nov 28th 2017, 14:31 obinoob not sure how to implement rollback in case of failure also not sure that this is the right way acoarding to my data model...
# Nov 28th 2017, 14:30 obinoob neon1024 I'm looking at this page https://book.cakephp.org/3.0/en/orm/database-basics.html#using-transactions
# Nov 28th 2017, 14:29 neon1024 ORM does support transactions. In fact everything is a transaction iirc
# Nov 28th 2017, 14:27 obinoob Hi, I'm registering a new client in system database and I need to process information in the following way: 1) add client info to clients table, 2) add address information etc to address table 3) add phones to phones tables 4) add mails to mails table etc... so if everything fails I need to roll back! I though of using transactions but not sure if ORM covers transactions anyway any suggestions are welcome thank you
# Nov 28th 2017, 13:39 casmo Onwers* better I think
# Nov 28th 2017, 13:39 casmo $this->belongsTo('Owner', ['className' => 'Users', 'foreignKey' => 'user_id']); $this->belongsToMany('Users');
# Nov 28th 2017, 13:38 casmo Yeah, use a different name and the same 'className' in the options
# Nov 28th 2017, 13:25 joopm is it possible to have belongsToMany and belongsTo association to the same model?
# Nov 28th 2017, 12:45 slackebot2 values within the test by `Configure::write("Email", "");` (which works for other tests where i set different config values) but it doesn't work for the email class. any ideas how i can inject alternative config values for `Cake\Mailer\Email` within a single test method?
# Nov 28th 2017, 12:45 felix hi, i want to test a class that uses `Cake\Mailer\Email`, creates a new instance of Email and gets me the `from` settings of the config. `$email = new Email('default');` `$from = $email->getFrom();` this gets me the correct config values. now, i would like to test the behaviour, when the from settings are not set correctly in the app.php config file (unlikely, but i want to have 100% coverage for this class). i tried to overwrite the config
# Nov 28th 2017, 12:42 joopm hello
# Nov 28th 2017, 12:41 iam.davidheart Hello
# Nov 28th 2017, 12:36 joopm but the goal is not to save in this case,the cancel buton
# Nov 28th 2017, 12:36 joopm but its flash that the test has been saved
# Nov 28th 2017, 12:36 joopm i made like this: <?= $this->Form->button(__('Cancel',['type'=>'button','onClick'=>'location.href=\'/test/new-tests\''])) ?>
# Nov 28th 2017, 12:35 joopm what is the correct way to make cancel button?
# Nov 28th 2017, 12:35 joopm all
# Nov 28th 2017, 12:35 joopm hello
# Nov 28th 2017, 11:23 neon1024 As the sub-nav essentially belongs to a Provider
# Nov 28th 2017, 11:23 neon1024 I’m being indecisive this morning. I am building a sub-navigation for my Providers view template, which lists their sub-pages. The provider is a Provider obviously, but it has attached Contents, and the sub-pages are all Contents. I can’t decide if I should put my method in the ProvidersTable or ContentsTable. I’m leaning towards Contents, as the navigation navigates content
# Nov 28th 2017, 11:17 HumanG33k thx
# Nov 28th 2017, 11:16 admad HumanG33k: https://bakery.cakephp.org/2017/11/22/mozilla_sos_audit_published.html
# Nov 28th 2017, 09:57 neon1024 Morning everyone
# Nov 28th 2017, 09:49 HumanG33k thx .)
# Nov 28th 2017, 09:49 HumanG33k …
# Nov 28th 2017, 09:49 HumanG33k missing <?php
# Nov 28th 2017, 09:48 HumanG33k hum find
# Nov 28th 2017, 09:45 HumanG33k my form is in src/Form/WikiForm.php
# Nov 28th 2017, 09:44 HumanG33k and i have done use App\Form\WikiForm; in the top of the file
# Nov 28th 2017, 09:44 HumanG33k i follow the model less example but when i do a $course = new WikiForm(); it’s not working
# Nov 28th 2017, 09:41 HumanG33k TotoForm in TitiController
# Nov 28th 2017, 09:41 HumanG33k Maybe stupid question but if i use a model less form can i do it even in controller with not the same name ie :
# Nov 28th 2017, 09:08 HumanG33k (if you know of course)
# Nov 28th 2017, 09:08 HumanG33k thx
# Nov 28th 2017, 09:08 HumanG33k if no when ?