# |
Aug 30th 2019, 10:41 |
neon1024 |
Eek |
# |
Aug 30th 2019, 10:39 |
spriz |
yeah if someone put a id in a column without `_id` I'll spank' em |
# |
Aug 30th 2019, 10:39 |
neon1024 |
Ah yeah `_id` suffix is a good idea @spriz |
# |
Aug 30th 2019, 10:39 |
spriz |
nullable `created_by_id` and `modified_by_id` |
# |
Aug 30th 2019, 10:38 |
spriz |
Same here @neon1024 :slightly_smiling_face: |
# |
Aug 30th 2019, 10:31 |
challgren |
I personally do |
# |
Aug 30th 2019, 10:24 |
neon1024 |
Feels like it would be handy |
# |
Aug 30th 2019, 10:24 |
neon1024 |
With the Footprint behaviour’s created_by and modified_by do most people add an association for it ? |
# |
Aug 30th 2019, 10:21 |
javier.villanueva |
@maiconpinto? |
# |
Aug 30th 2019, 10:05 |
conehead |
Yep. The tutorial was just outdated |
# |
Aug 30th 2019, 10:05 |
javier.villanueva |
Anyone use cakephp-adminlte-theme ? I am trying to override bake templates but I dont get it. I have been able to override layouts and elements without problems :( |
# |
Aug 30th 2019, 10:04 |
challgren |
THeres a test case for it |
# |
Aug 30th 2019, 10:04 |
challgren |
https://github.com/cakephp/cakephp/blob/575b740b4f9f7517ae94bca2bfe2b6dc10fe5599/tests/TestCase/View/Widget/SelectBoxWidgetTest.php#L167 |
# |
Aug 30th 2019, 10:03 |
conehead |
https://github.com/cakephp/cakephp/blob/575b740b4f9f7517ae94bca2bfe2b6dc10fe5599/src/View/Widget/SelectBoxWidget.php#L62 |
# |
Aug 30th 2019, 10:02 |
conehead |
it needs to be `'text' => 'Two',` now instead of `'name' => 'Two',` |
# |
Aug 30th 2019, 10:02 |
conehead |
Ah |
# |
Aug 30th 2019, 10:01 |
dereuromark |
i am sure there must be some test case for this. |
# |
Aug 30th 2019, 10:01 |
dereuromark |
oha.. I wonder if that is a regression |
# |
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 |