Log message #4200626

# At Username Text
# Aug 30th 2019, 09:58 conehead Just returns `Two2extra` as name. So it merges just all the values together
# Aug 30th 2019, 09:56 conehead @dereuromark Well I just tried it. Does not seem to work anymore :(
# Aug 30th 2019, 09:53 slackebot2 in a single `hasOne` statement ? Thanks in advance !
# Aug 30th 2019, 09:53 slackebot2 'OfficialDocuments.withdrawal_doc' => true, 'OfficialDocuments.user_doc' => true, 'OfficialDocuments.traceability_doc' => false, 'OfficialDocuments.retailer_id <> ' => 0, 'OfficialDocuments.RefRetailers.is_official' => true ], ]); ``` But (and it seems legit), it generates the request without joining the `RefRetailers` table. Is there any way to get the result I expect
# Aug 30th 2019, 09:53 jbcharron Hi there, I'm struggling with a Table `hasOne` conditions, I would like to do something like this : ``` $this->hasOne('OfficialDocuments', [ 'className' => 'OfficialDocuments', 'foreignKey' => 'model_id', 'dependent' => true, 'conditions' => [ 'OfficialDocuments.model' => 'withdrawals', 'OfficialDocuments.recall_doc' => false,
# Aug 30th 2019, 09:50 dereuromark it probabyl looks for name/value key strings and then does not build groups (groups are most likely numeric index depths)
# Aug 30th 2019, 09:49 dereuromark long long time ago.
# Aug 30th 2019, 09:49 dereuromark the key is to use assoc arrays afaik.
# Aug 30th 2019, 09:39 conehead But this will help me a lot. Thanks once again
# Aug 30th 2019, 09:39 conehead It checks for the value key as it seems
# Aug 30th 2019, 09:35 conehead Ah. I tried arrays...but got groups instead
# Aug 30th 2019, 09:35 dereuromark the date tells me I am getting old..^^
# Aug 30th 2019, 09:35 dereuromark as array, yeah. see docs or my tips blog post https://www.dereuromark.de/2012/03/01/some-new-crazy-cakephp-tricks/#setting-additional-attributes-for-some-select-options
# Aug 30th 2019, 09:18 conehead Hm is there an easy way to add additional data to a form select options? I need something like this `<select><option class="x" value="1">Foo</option></select>`
# Aug 30th 2019, 08:49 slackebot2 <challgren>
# Aug 30th 2019, 08:49 alexdd55976 thnaks for pushing me in the right direction
# Aug 30th 2019, 08:48 alexdd55976 ok, sorry...
# Aug 30th 2019, 08:48 alexdd55976 i wanted to set the view, not actually render it ... AAAARGH
# Aug 30th 2019, 08:48 challgren $this->render will fire a beforeRender event
# Aug 30th 2019, 08:48 alexdd55976 i am an idiot
# Aug 30th 2019, 08:48 alexdd55976 oh
# Aug 30th 2019, 08:48 alexdd55976 i didn't expect this
# Aug 30th 2019, 08:47 challgren thats a loop for sure
# Aug 30th 2019, 08:47 alexdd55976 it happens
# Aug 30th 2019, 08:47 alexdd55976 when i do this: ``` public function beforeRender(EventInterface $event) { parent::beforeRender($event); $this->render('results'); } ```
# Aug 30th 2019, 08:47 alexdd55976 oh, interseting
# Aug 30th 2019, 08:46 alexdd55976 whats it hashing anyway
# Aug 30th 2019, 08:46 alexdd55976 i do not understand why this happens...
# Aug 30th 2019, 08:45 dereuromark well, it can also be really too much depth
# Aug 30th 2019, 08:44 alexdd55976 i am lost on this one
# Aug 30th 2019, 08:42 alexdd55976 wtf?
# Aug 30th 2019, 08:42 alexdd55976 on that?
# Aug 30th 2019, 08:42 alexdd55976 > C:\webroot\ng\vendor\cakephp\cakephp\src\Utility\Hash.php
# Aug 30th 2019, 08:41 alexdd55976 but on what?
# Aug 30th 2019, 08:41 dereuromark recursion is fun
# Aug 30th 2019, 08:40 alexdd55976 :thinking_face:
# Aug 30th 2019, 08:40 alexdd55976 `Maximum function nesting level of '256' reached, aborting!`
# Aug 30th 2019, 08:08 neon1024 :thumbsup:
# Aug 30th 2019, 08:08 javier.villanueva thanks neon
# Aug 30th 2019, 08:08 javier.villanueva ok... works
# Aug 30th 2019, 08:08 javier.villanueva ok