# |
Feb 19th 2020, 14:14 |
dereuromark |
also way more performant this way, especially on larger datasets. |
# |
Feb 19th 2020, 14:13 |
dereuromark |
this is not business logic, but low level data integrety. big difference. |
# |
Feb 19th 2020, 14:11 |
neon1024 |
:P |
# |
Feb 19th 2020, 14:10 |
neon1024 |
Ooh, now we’re talking |
# |
Feb 19th 2020, 14:10 |
spriz |
it can also whack ya up! :v: |
# |
Feb 19th 2020, 14:10 |
spriz |
Although same issue appears when default finder is excluding "soft deleted" ones :shrug: |
# |
Feb 19th 2020, 14:10 |
neon1024 |
At least then my DB can save me from myself in some instances |
# |
Feb 19th 2020, 14:10 |
neon1024 |
..but then I think why not both? |
# |
Feb 19th 2020, 14:10 |
neon1024 |
I feel a bit bad putting what I’d think was more business logic into the database |
# |
Feb 19th 2020, 14:09 |
spriz |
but also generally I do not delete rows at all :) :) |
# |
Feb 19th 2020, 14:09 |
spriz |
it's all app-logic |
# |
Feb 19th 2020, 14:09 |
spriz |
Yeah, true PITA @dereuromark Related to discussion last week - I'm not putting FKs in DB at all currently :shrug: |
# |
Feb 19th 2020, 14:08 |
khalid |
not sure if its the correct solution but best i could come around is: ```public static function setUpBeforeClass() { Configure::write('Acl.database', 'test');``` |
# |
Feb 19th 2020, 14:08 |
dereuromark |
i found it because I was listing all non assigned entities, and after removing one relation it still didnt show (field IS NULL)^^ |
# |
Feb 19th 2020, 14:07 |
dereuromark |
yeah, I had to always fix this after some relations are already broken^^ because I forgot to add it into the migration in the first place. |
# |
Feb 19th 2020, 14:05 |
spriz |
Ah, in the migration! Mindblown! |
# |
Feb 19th 2020, 14:04 |
spriz |
How do you do that again @dereuromark? :O |
# |
Feb 19th 2020, 14:03 |
khalid |
and problem is only with Controllers Tests, Model tests works fine |
# |
Feb 19th 2020, 13:58 |
neon1024 |
How are the repository splits achieved on Github for the cakephp packages? |
# |
Feb 19th 2020, 13:58 |
dereuromark |
darn, I always forget the ```->addForeignKey('other_id', 'others', ['id'], ['delete' => 'SET_NULL'])``` part for optional hasMany => belongsTo relations where the belongsTo part could be removed and thus the data integrity is not there anymore (pointing to nonexistent keys). |
# |
Feb 19th 2020, 13:56 |
khalid |
any help will be much appreciated :) |
# |
Feb 19th 2020, 13:55 |
slackebot |
(!Configure::read('Acl.database')) { Configure::write('Acl.database', 'default');} so question is how can we use both Test and Application with ACL. |
# |
Feb 19th 2020, 13:55 |
khalid |
Hi Everyone, We are using Cakephp3 and Acl plugin from Cake, but problem is when we are running UnitTests its giving The datasource configuration "" was not found. but if we go to config/app.php and add 'Acl' => ['database' => 'test'] test works but then our main Application start failing because ACL is using Database Test now for Application too not only for tests further more i have seen Cakephp/Acl/config/bootstrap.php if |
# |
Feb 19th 2020, 13:53 |
kiwi_10 |
so question is how can we use both Test and Application with ACL. |
# |
Feb 19th 2020, 13:52 |
kiwi_10 |
further more i have seen Cakephp/Acl/config/bootstrap.php if (!Configure::read('Acl.database')) { Configure::write('Acl.database', 'default');} |
# |
Feb 19th 2020, 13:52 |
kiwi_10 |
but then our main Application start failing because ACL is using Database Test now for Application too not only for tests |
# |
Feb 19th 2020, 13:51 |
kiwi_10 |
but if we go to config/app.php and add 'Acl' => ['database' => 'test'] test works |
# |
Feb 19th 2020, 13:51 |
kiwi_10 |
Hi Everyone, We are using Cakephp3 and Acl plugin from Cake, but problem is when we are running UnitTests its giving The datasource configuration "" was not found. |
# |
Feb 19th 2020, 12:27 |
jotpe |
Hi, people! |
# |
Feb 19th 2020, 12:27 |
admad |
@val https://github.com/cakephp/authorization/pull/124 |
# |
Feb 19th 2020, 12:09 |
tomrwaller |
Haha at this point @ndm probably knows more about my project than I do! |
# |
Feb 19th 2020, 12:08 |
neon1024 |
Ah, there you are. A clever person appears! |
# |
Feb 19th 2020, 12:08 |
tomrwaller |
Ah - great @ndm - I'll give that a whirl. |
# |
Feb 19th 2020, 12:08 |
tomrwaller |
Thanks @neon1024 - I've followed that which is what I'm using. |
# |
Feb 19th 2020, 12:08 |
ndm |
Multi selects use the `selectMultiple` template |
# |
Feb 19th 2020, 12:07 |
neon1024 |
You may end up needing a custom form widget, but I haven’t used those before, so not too certain |
# |
Feb 19th 2020, 12:06 |
neon1024 |
I’d check the book https://book.cakephp.org/3/en/views/helpers/form.html#customizing-the-templates-formhelper-uses |
# |
Feb 19th 2020, 12:06 |
neon1024 |
Could be |
# |
Feb 19th 2020, 12:06 |
tomrwaller |
I have inputContainer - is that not the same thing? |
# |
Feb 19th 2020, 12:04 |
neon1024 |
Probably looking for the inputWrapper template? |
# |
Feb 19th 2020, 11:53 |
tomrwaller |
But in my HTML output the select isn't picking up the class. |