# |
Jun 11th 2018, 13:23 |
lorenzo |
veve here’s an example https://book.cakephp.org/3.0/en/orm/saving-data.html#saving-complex-types |
# |
Jun 11th 2018, 13:22 |
dereuromark |
nano opt has nothing do with the computer size |
# |
Jun 11th 2018, 13:22 |
lorenzo |
use the `_initializeSchema()` function in your tables to change the type of the columns you need to be different |
# |
Jun 11th 2018, 13:22 |
veve |
a good dev is able to work on very small computers and is not insulting towards others |
# |
Jun 11th 2018, 13:22 |
neon1024 |
Also not nice to talk down to people @dereuromark |
# |
Jun 11th 2018, 13:22 |
lorenzo |
veve, there is a way to do it |
# |
Jun 11th 2018, 13:21 |
dereuromark |
:slightly_smiling_face: Moving on |
# |
Jun 11th 2018, 13:21 |
dereuromark |
A good dev, however, knows when to use good advice given, instead of just disagreeing even though he doesnt have the numbers and facts to prove it. |
# |
Jun 11th 2018, 13:21 |
admad |
veve: if you want to be pig headed about it then you can override the column type by modifying table schema from Table::__initializeSchema() method https://api.cakephp.org/3.6/class-Cake.ORM.Table.html#__initializeSchema |
# |
Jun 11th 2018, 13:21 |
veve |
no way to talk ! :-( |
# |
Jun 11th 2018, 13:20 |
dereuromark |
what do you is up to you. |
# |
Jun 11th 2018, 13:20 |
dereuromark |
I dont care :slightly_smiling_face: Just saying what the correct way is, based also on hundreds of years of experience of the top 10+ core devs. |
# |
Jun 11th 2018, 13:20 |
dereuromark |
even unsigned etc is usually totally irrelevant, but if you want to you can do it |
# |
Jun 11th 2018, 13:20 |
veve |
I'm sorry but I completly disagree with you. |
# |
Jun 11th 2018, 13:19 |
neon1024 |
madrid988, If a “semi-month” is indeed a fortnight, I wrote a bit of code for working with that which could be helpful, https://github.com/davidyell/Fortnights |
# |
Jun 11th 2018, 13:19 |
dereuromark |
yes, thats tinyint(2) |
# |
Jun 11th 2018, 13:16 |
josbeir |
i can aslo concur :slightly_smiling_face: |
# |
Jun 11th 2018, 13:16 |
veve |
I have fields with 3 ou 4 states maximum, so no need to oversize the fields |
# |
Jun 11th 2018, 13:15 |
dereuromark |
ask lorenzo and others who actually work with huge DBs with cake :slightly_smiling_face: they can give you the numbers |
# |
Jun 11th 2018, 13:15 |
dereuromark |
you only create huge bugs, the benefit is 0 here. |
# |
Jun 11th 2018, 13:14 |
dereuromark |
thats not optimzation, not at all |
# |
Jun 11th 2018, 13:14 |
veve |
slackebot, I'm working on a very very big database and I need to optimize storage as much as possible |
# |
Jun 11th 2018, 13:14 |
dereuromark |
tinyint(1) should always equal bool |
# |
Jun 11th 2018, 13:13 |
dereuromark |
enum and others, I mean |
# |
Jun 11th 2018, 13:13 |
dereuromark |
instead change the schema, fix it to tinyint(2) for bool and others |
# |
Jun 11th 2018, 13:13 |
dereuromark |
why? I think you have the wrong attempt on this |
# |
Jun 11th 2018, 13:12 |
veve |
Hello, is there a way to change CakePhp 3 behaviour so that it does not "treat" tinyint as boolean (except by modifying the database structure) ? |
# |
Jun 11th 2018, 12:59 |
lorenzo |
what’s a semi-month? |
# |
Jun 11th 2018, 12:58 |
admad |
well then i have no idea what a "semi-month" is, good luck |
# |
Jun 11th 2018, 12:57 |
madrid988 |
I will create a function to do so |
# |
Jun 11th 2018, 12:57 |
madrid988 |
admad: some semi-months have more more than 14 days, so adding +1 month +2 weeks would not be correct. |
# |
Jun 11th 2018, 12:50 |
Arckame |
(sorry, my english isn't very good) |
# |
Jun 11th 2018, 12:49 |
Arckame |
e, 'prefix' => false, '_ext' => false, )" |
# |
Jun 11th 2018, 12:49 |
Arckame |
I have some issue with debugKit and cakephp 3.6.5, composer dependencies are clean, the debugkit icon is availble in the bottom right, but with the error message "Error: DebugKitController could not be found.", the error.log return "Controller class DebugKit could not be found. Exception Attributes: array ( 'class' => 'DebugKit', 'plugin' => fals |
# |
Jun 11th 2018, 12:48 |
admad |
don't think there's a method like `addFortnight()` (which is what i assume you mean by "semi-month") |
# |
Jun 11th 2018, 12:47 |
admad |
+1 month, +2 weeks would be one way |
# |
Jun 11th 2018, 12:44 |
madrid988 |
Using chronos, how can I add 3 'semi-months' to a DateTime? |
# |
Jun 11th 2018, 12:42 |
Arckame |
hello |
# |
Jun 11th 2018, 12:27 |
josbeir |
;) |
# |
Jun 11th 2018, 12:27 |
mohitprakashsharma555 |
@tim @josbeir Thanks for response guys i got a solution :slightly_smiling_face: $states = $this->Counties->States->find('list',['keyField' => 'id','valueField' =>'state'])->toArray(); |
# |
Jun 11th 2018, 12:26 |
kitcat711 |
ok, trying |