Logs for #cakephp

Page 1 of 35,602, showing 100 records out of 3,560,167 total, starting on record 1, ending on 100

# At Username Text
# Yesterday, 21:16 Sigfried84 okk
# Yesterday, 21:15 savant dont remember, heading into the shower
# Yesterday, 21:15 Sigfried84 in an Authorities Entity?
# Yesterday, 21:14 Sigfried84 the example is not a join field...would it be like: $this->Authors->_properties['name'] ?
# Yesterday, 21:12 Sigfried84 cool! thnx! bye!
# Yesterday, 21:11 savant https://book.cakephp.org/3.0/en/orm/retrieving-data-and-resultsets.html#customize-key-value-output <-- that
# Yesterday, 21:10 Sigfried84 bye!
# Yesterday, 21:10 Sigfried84 late ^_^!
# Yesterday, 21:09 Sigfried84 if you're still here...
# Yesterday, 21:09 Sigfried84 just one more thing...how do i concatenate them?
# Yesterday, 21:08 savant no problem, night
# Yesterday, 21:07 Sigfried84 Ok savant, I'll try to find out how tomorrow! Now I'm heading to bed! Thank you so much!
# Yesterday, 21:05 savant good luck :slightly_smiling_face:
# Yesterday, 21:05 savant find(‘list’) ^
# Yesterday, 21:05 savant https://book.cakephp.org/3.0/en/orm/retrieving-data-and-resultsets.html#finding-key-value-pairs
# Yesterday, 21:04 Sigfried84 i added a ->['contain' => ['Authors', 'AuthorTypes']]
# Yesterday, 21:04 savant im headed into the shower, but the above shows how to use contain
# Yesterday, 21:04 savant https://book.cakephp.org/3.0/en/orm/query-builder.html#loading-associations
# Yesterday, 21:03 savant you’d need to `contain` the extra tables - it’s like joining - and modify the `fields` that are retrieved for that find
# Yesterday, 21:03 Sigfried84 a concatenation of these fields?
# Yesterday, 21:02 Sigfried84 how and make it show author.name and author_type.name?
# Yesterday, 21:02 savant you’ll need to modify that find(‘list’) call to get it to show something other than the `id` as the displayField
# Yesterday, 21:02 savant so the authorities dropdown is populated by the Authorities->find(list) call
# Yesterday, 20:51 Sigfried84 Sorry for the delay
# Yesterday, 20:50 Sigfried84 Books/add.ctp https://www.irccloud.com/pastebin/3JuAw1Mr/
# Yesterday, 20:49 Sigfried84 Books Controller https://www.irccloud.com/pastebin/QsV0ywdZ/
# Yesterday, 20:41 Sigfried84 sure...let me fix some things...i messed up something ^_^!
# Yesterday, 20:33 savant can you gist the add.ctp and your BooksController.php as well
# Yesterday, 20:27 Sigfried84 (illustrators table is unnecessary...)
# Yesterday, 20:26 Sigfried84 https://www.irccloud.com/pastebin/LfFZynZ2/
# Yesterday, 20:23 savant just trying to get you to actually show all the information so Im not guessing at what im looking at
# Yesterday, 20:22 Sigfried84 Sure I can
# Yesterday, 20:22 Sigfried84 lol...in no way was my intention to assume you don't know how it works. Sorry for that.
# Yesterday, 20:22 savant Can you show your _entire_ database schema?
# Yesterday, 20:21 savant if it helps to prove that, I’m one of the core developers
# Yesterday, 20:21 savant I know how cakephp works
# Yesterday, 20:21 Sigfried84 sorry I did not post books table because I thought field there were irrelevant as no fields refer to authorities, authors, etc. Bake deduces relation and includes an input with authorities_ids.
# Yesterday, 20:20 savant in your controller
# Yesterday, 20:20 savant you’d need to change the find call to do that
# Yesterday, 20:19 Sigfried84 well...the thing is how to get two join field to be a display field....so how author.name + author_type.name can be displayfield of authorities_books
# Yesterday, 20:19 savant where is the books table
# Yesterday, 20:16 Sigfried84 here :) https://www.irccloud.com/pastebin/o0GUan8M/
# Yesterday, 20:13 savant im not asking for stuff from you for my health ;)
# Yesterday, 20:13 Sigfried84 lol..obviously no problem to show that!
# Yesterday, 20:13 Sigfried84 :D
# Yesterday, 20:13 Sigfried84 the thing is how can i get a a joined field to be a display field
# Yesterday, 20:13 savant but if you dont want to show the table schema because you think its not useful, thats fine, I dont need to help :slightly_smiling_face:
# Yesterday, 20:12 savant i know how cake bake works, so my guess is that the dropdowns are showing an id instead of the name field because the displayField of your tables is being incorrectly detected
# Yesterday, 20:12 savant just saying if someone is asking for something, they are probably asking for good reason
# Yesterday, 20:11 Sigfried84 enjoy it :D
# Yesterday, 20:11 Sigfried84 ok ;)
# Yesterday, 20:11 savant good luck!
# Yesterday, 20:11 savant im going to go eat breakfast now
# Yesterday, 20:11 savant okay dont show me it then
# Yesterday, 20:11 Sigfried84 but it does not include any relation statement...cake bake deduces everything
# Yesterday, 20:10 savant yes
# Yesterday, 20:10 Sigfried84 the sql?
# Yesterday, 20:10 savant the create table calls
# Yesterday, 20:10 Sigfried84 how?
# Yesterday, 20:10 savant can you show the exact schema for your tables?
# Yesterday, 20:08 Sigfried84 i am make a DB on books. 1 book can have many authors. 1 author can be many types of author. For example, Book 1 is written by Tom and drawn by Jane. Book 2 is written and drawn by Jane and translated by Tom. So I have: books, authors, author_types. I did this: authors table (id, name) - author_types table (id, name) - authorities table (id, author_id, author_type_id) - authorities_books table (id, book_id,
# Yesterday, 20:08 Sigfried84 authority_id). I think this is the best design, is it? CakePHP baked that without problem. The problem I have now is that on the Template/Books/add.ctp I can only see author_id and author_type_id. And I have been a couple of days struggling to see author.name and author_type.name. Is that a matter of the find method? virutalfields? I am completely lost :)
# Yesterday, 19:59 savant but you’d be treating the authors as a pivot table in a sense
# Yesterday, 19:59 savant You _can_ use `hasMany through`, as mentioned in the docs here: https://book.cakephp.org/3.0/en/orm/associations.html#using-the-through-option
# Yesterday, 19:58 savant If you can explain what exactly you’re trying to do there, maybe someone can help with that specific problem
# Yesterday, 19:58 savant there isnt a way to create a join table two models deep
# Yesterday, 19:57 savant the answer is “no”
# Yesterday, 19:57 savant Sigried84: for your question “Does a model authors_author_types_books work?”
# Yesterday, 19:52 savant I can help you for money
# Yesterday, 19:52 savant hi!
# Yesterday, 19:51 Sigfried84 Hello! I need someone that could solve my questions on CakePHP. Any idea where I can get help for money?
# Yesterday, 19:50 savant no way to “switch” validators like that
# Yesterday, 19:50 savant @mdotobie you’d need to check the value before calling newEntity
# Yesterday, 19:44 iqu my god. found the bud. it was mine :)
# Yesterday, 19:38 iqu same with 3.5.12
# Yesterday, 19:33 iqu cake3.5.10
# Yesterday, 19:30 iqu already emptied cache
# Yesterday, 19:29 iqu even if i remove buildrules
# Yesterday, 19:29 iqu found annoying bug: basically same https://stackoverflow.com/questions/46684324/what-happen-to-my-validation-using-cakephp3-4-13
# Yesterday, 16:10 mdotobie Is there a way to conditionally select a validator set used for a newEntity call. I have an object and depending on the value on one of the keys a different validator set should be used. But I’m trying to build this extensibly so I don’t have to hard code all possible validators initially but instead define them on classes that can be dynamically loaded based on that value.
# Yesterday, 15:20 muerte have't other way?
# Yesterday, 15:11 dereuromark yes
# Yesterday, 15:10 muerte ?
# Yesterday, 15:10 muerte or you mean your app sandbox: https://github.com/dereuromark/cakephp-sandbox
# Yesterday, 15:10 muerte where is sandbox?
# Yesterday, 15:09 madrid988 that would be an easy rule to remember.
# Yesterday, 15:08 madrid988 If I have an array being sent back to an html form, those keys will be sent back as data fields so I use underscore for those?
# Yesterday, 15:04 admad if you notice all config keys in options for various core classes are camelCased
# Yesterday, 15:03 admad madrid988: yes, underscore only for db fields, else camelCase
# Yesterday, 15:03 madrid988 I would like to match the conventions cake used
# Yesterday, 15:03 madrid988 Does anyone know the convention CakePHP uses for array key names? Should I only use underscore_case when the key represents a database field, and use titleCase for all other array keys? If I have an array which represents data, should I use underscore_case?
# Yesterday, 14:51 dereuromark should work just fine either way, see the sandbox app.
# Yesterday, 14:51 dereuromark which is correct, but probably not even needed
# Yesterday, 14:50 muerte I think Plugin::load('Calendar'); was is add by bake plugin load
# Yesterday, 14:34 spriz #sunday
# Yesterday, 14:33 spriz Aye… git reset it is :,)
# Yesterday, 14:32 hmic you'll just need the very same beforeFilter() methid in that component too, nothing else
# Yesterday, 14:31 hmic well... you might revisit that
# Yesterday, 14:31 spriz and also because I thought component was over-engineering it
# Yesterday, 14:31 spriz because I liked `use RequiresActiveAccountTrait;` better than putting `$this->loadComponent(‘RequiresActiveAccount’);`