# |
Apr 29th 2019, 17:21 |
itmpls |
no unique index in the table itself |
# |
Apr 29th 2019, 17:21 |
itmpls |
I supplied that as an option (set to true) but it still doesn't appear to allow multiple nulls |
# |
Apr 29th 2019, 17:21 |
itmpls |
anyone know how allowMultipleNulls works in conjunction with isUnique validation? |
# |
Apr 29th 2019, 14:57 |
ricksaccous |
no problem |
# |
Apr 29th 2019, 14:55 |
neon1024 |
Try using `Log::debug()` instead, I’ve had issues trying to echo from inside a closure |
# |
Apr 29th 2019, 14:54 |
itmpls |
this is for an associated model, the first debug is hit |
# |
Apr 29th 2019, 14:54 |
itmpls |
anyone know why the 'on' callback is never reached despite there being an email field? https://gist.github.com/medero/fdbb2aff8efa08bc6376e557c33a3963 |
# |
Apr 29th 2019, 13:12 |
fra.bdn |
It looks like it worked, thanks! public function beforeMarshal(Event $event, ArrayObject $data, ArrayObject $options) { if (isset($data['short_code'])) { if($data['short_code'] == ''){ $data['short_code'] = NULL; } } } |
# |
Apr 29th 2019, 12:57 |
ricksaccous |
meh |
# |
Apr 29th 2019, 12:57 |
ricksaccous |
actually maybe it's fine |
# |
Apr 29th 2019, 12:57 |
ricksaccous |
to me that's a quick/dirty solution, heh |
# |
Apr 29th 2019, 12:56 |
ricksaccous |
you could prob just set it as null if it's empty string in beforeMarshall if you want |
# |
Apr 29th 2019, 12:55 |
fra.bdn |
Looks like $this->request->getData()['short_code'] returns "". |
# |
Apr 29th 2019, 12:51 |
ricksaccous |
or is it being set as empty string? |
# |
Apr 29th 2019, 12:51 |
ricksaccous |
strange, are you sure it's being set as null |
# |
Apr 29th 2019, 12:51 |
fra.bdn |
And even setting it explicitely to true, the form does not save. |
# |
Apr 29th 2019, 12:49 |
ricksaccous |
my bad |
# |
Apr 29th 2019, 12:49 |
fra.bdn |
yes, that's why I was asking. |
# |
Apr 29th 2019, 12:49 |
ricksaccous |
allowMultipleNulls |
# |
Apr 29th 2019, 12:49 |
ricksaccous |
but it does say it's set to true by default, the option is called |
# |
Apr 29th 2019, 12:48 |
ricksaccous |
oh it does |
# |
Apr 29th 2019, 12:48 |
ricksaccous |
I'm not sure if isUnique has that option |
# |
Apr 29th 2019, 12:48 |
ricksaccous |
oh wait sorry i was thinking existsIn |
# |
Apr 29th 2019, 12:47 |
ricksaccous |
@fra.bdn yeah what @dereuromark said |
# |
Apr 29th 2019, 12:46 |
dereuromark |
it might/could if one programs it in. |
# |
Apr 29th 2019, 12:46 |
dereuromark |
i dont think rules code knows about foreign key or not. it just sees all equal. |
# |
Apr 29th 2019, 12:46 |
fra.bdn |
even if that's not a foreign key? |
# |
Apr 29th 2019, 12:45 |
ricksaccous |
and set that to true |
# |
Apr 29th 2019, 12:45 |
ricksaccous |
allowNullableNulls or something |
# |
Apr 29th 2019, 12:45 |
ricksaccous |
you have to feed it an option |
# |
Apr 29th 2019, 12:41 |
fra.bdn |
Hi, shouldn't the isUnique rule allow multiple null values by default? It was defined like this: |
# |
Apr 29th 2019, 12:20 |
hollistergraham123 |
@noel I am also finishing up a Vue app now using CakePHP as an API. So if you want any help, let me know. |
# |
Apr 29th 2019, 11:49 |
noel |
@neon1024 I’m creating a CakePHP 3.7 Plugin for the Quasar UI library (which is built on Vue). I’m wiring it into bake so that you can bake from the plugin theme and end up with a Quasar UI for your scaffolding. |
# |
Apr 29th 2019, 11:35 |
megan |
Not sure on how the location will be decided for next year tbh |
# |
Apr 29th 2019, 11:31 |
neothermic |
I suspect Japan would be the same costing problem, just flying the opposite direction :) |
# |
Apr 29th 2019, 11:31 |
neothermic |
was trying to convince my work to send me to a conference in SF, but that's super mega expensive on flights (~1k/person), and that's ignoring ticket and hotel costs :( |
# |
Apr 29th 2019, 11:30 |
neothermic |
nah, somewhere in the EU would suffice |
# |
Apr 29th 2019, 11:29 |
neon1024 |
Do you just want Cakefest in the UK? |
# |
Apr 29th 2019, 11:28 |
neothermic |
do you think it'll be a vote list for 2020? |
# |
Apr 29th 2019, 11:27 |
megan |
Haha yes it was a vote from a list of a couple of places that have been requested - Japan won! |
# |
Apr 29th 2019, 11:26 |
neothermic |
@megan what kind of bribery do you require? :P |