Log message #4049270

# At Username Text
# Jul 7th 2017, 14:25 inoas you could extend that to Cake\ORM\Entity
# Jul 7th 2017, 14:25 mic_ hmic: but so far no solution similar to Date/FrozenDate with their ::setToStringFormat()
# Jul 7th 2017, 14:24 mic_ hmic: Type::build('decimal')->useLocaleParser() fixes "input formatting"
# Jul 7th 2017, 14:24 inoas this is what I do @ devito https://gist.github.com/inoas/60c9c7372d5fb7ce6f70b5691796ceba
# Jul 7th 2017, 14:24 hmic answer: it's not. so no way to format "automagically"... you could, however, make the database type "decimal" locale aware (probably want float/double) too!
# Jul 7th 2017, 14:23 mic_ hmic: I added explicitly 'type' => 'decimal' to Form->input(), but no change in formatting
# Jul 7th 2017, 14:22 inoas auto-entities are imho "okay" but can also be a problem
# Jul 7th 2017, 14:22 inoas devito auto models are IMHO an evil thing
# Jul 7th 2017, 14:21 mic_ hmic: 2 sec
# Jul 7th 2017, 14:21 mic_ aha
# Jul 7th 2017, 14:20 hmic a formhelper input type, widget too
# Jul 7th 2017, 14:19 mic_ hmic: you mean "type", as in the Form template/HTML input - or type as Database?
# Jul 7th 2017, 14:18 hmic mic_, is there a field type that formhelper knows about, that holds decimal data?
# Jul 7th 2017, 14:17 mic_ should resort to Javascript to make the final formatting, or is there an option that would automatically tell the FormHelper to fix my decimals with proper, locale aware formatting?
# Jul 7th 2017, 14:16 mic_ I am trying to find a solution to localized decimals + form helper. The built-in piping allows to use locale parser for decimals in a given locale, but FormHelper always throws in the value "as in the DB".
# Jul 7th 2017, 14:15 devito yesterday my name spacing got me all messed up. I baked a model and forgot to prefix it with the plugin name. then when i tried to create and save, the modified and created dates weren't updating. Took me a while to realize my models were in the wrong place
# Jul 7th 2017, 14:13 devito me 2
# Jul 7th 2017, 14:12 admad @devito I think you need a break :slightly_smiling_face:
# Jul 7th 2017, 14:06 devito thanks
# Jul 7th 2017, 14:06 devito @neon1024 yea i read to fast. didnt see the options were bulleted under each relationship type.
# Jul 7th 2017, 14:05 inoas but there is also CRUD + Crud View which might help you for semi-automated apps
# Jul 7th 2017, 14:04 inoas and then loop and use FormHelper::inputs()
# Jul 7th 2017, 14:04 inoas akkaweb that sounds not so wise... however what you can look at is $_hidden ... in a similar way you could design visibility maps for entities
# Jul 7th 2017, 14:04 neon1024 https://book.cakephp.org/3.0/en/orm/associations.html this page you mean?
# Jul 7th 2017, 14:04 devito anyone know where i can find a list of all available assoiation options? foreignKey,join type etc? Im looking in the cookbook but might be in the wrong spot. Im on associations but only see the basic association options
# Jul 7th 2017, 13:50 devito forgot about that hehe
# Jul 7th 2017, 13:50 devito ahhh yes
# Jul 7th 2017, 13:49 dereuromark in the debug kit, sure
# Jul 7th 2017, 13:48 devito is there a way to inspect the sql generated by a pagination query?
# Jul 7th 2017, 13:40 akkaweb :+1: Yeah, It seemed great, but I foresee a multitude of issues. I will rethink it and change the approach
# Jul 7th 2017, 13:37 admad i would suggest a rethink :slightly_smiling_face:
# Jul 7th 2017, 13:37 akkaweb @admad So I was hoping CakePHP helpers would provide events that I could listen to, ie afterFormStart / beforeFormEnd. I dunno, perhpas this is far fetched and I should rethink the approach
# Jul 7th 2017, 13:35 dereuromark dunno
# Jul 7th 2017, 13:34 neon1024 Hey @dereuromark should this really be a bitwise data type class? https://github.com/dereuromark/cakephp-tools/blob/master/src/Model/Behavior/BitmaskedBehavior.php#L126
# Jul 7th 2017, 13:34 akkaweb @admad Rethinking it, maybe it is not such a great idea. Researching phase :) I am working on the backend of an application I am creating and I wanted to be able to create a plugin that inserts 2 - 3 inputs to the Add/Edit form for a specific model/entity. Ultimately, I would use behavior to catch those fields and save them in a separate table connected by Id.
# Jul 7th 2017, 13:27 admad @akkaweb what exactly are you trying to do?
# Jul 7th 2017, 13:26 matija.baskarad Screw me. Admin routing with cakedc/user is fd up... :)
# Jul 7th 2017, 13:26 akkaweb @inoas Thanks for the info! I will take a closer look and try these
# Jul 7th 2017, 13:25 inoas Ref https://bakery.cakephp.org/2017/06/23/upcoming-cakephp-roadmap.html : "In addition to the breaking changes being made, we’d also like to use 4.0 as an opportunity to refine and improve our error messages with the goals of providing a better development experience. As users of Rust and Elm we see what can be done with error messages and want to bring the quality of error messages available in those tools to PHP." <3 <3 <3
# Jul 7th 2017, 13:22 inoas https://api.cakephp.org/3.4/source-class-Cake.Http.ServerRequest.html#1796-1812
# Jul 7th 2017, 13:22 inoas can't find withData() in the book tbh