Log message #4119764

# At Username Text
# Feb 25th 2018, 20:26 Sigfried84 https://www.irccloud.com/pastebin/LfFZynZ2/
# Feb 25th 2018, 20:23 savant just trying to get you to actually show all the information so Im not guessing at what im looking at
# Feb 25th 2018, 20:22 Sigfried84 Sure I can
# Feb 25th 2018, 20:22 Sigfried84 lol...in no way was my intention to assume you don't know how it works. Sorry for that.
# Feb 25th 2018, 20:22 savant Can you show your _entire_ database schema?
# Feb 25th 2018, 20:21 savant if it helps to prove that, I’m one of the core developers
# Feb 25th 2018, 20:21 savant I know how cakephp works
# Feb 25th 2018, 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.
# Feb 25th 2018, 20:20 savant in your controller
# Feb 25th 2018, 20:20 savant you’d need to change the find call to do that
# Feb 25th 2018, 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
# Feb 25th 2018, 20:19 savant where is the books table
# Feb 25th 2018, 20:16 Sigfried84 here :) https://www.irccloud.com/pastebin/o0GUan8M/
# Feb 25th 2018, 20:13 savant im not asking for stuff from you for my health ;)
# Feb 25th 2018, 20:13 Sigfried84 :D
# Feb 25th 2018, 20:13 Sigfried84 lol..obviously no problem to show that!
# Feb 25th 2018, 20:13 Sigfried84 the thing is how can i get a a joined field to be a display field
# Feb 25th 2018, 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:
# Feb 25th 2018, 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
# Feb 25th 2018, 20:12 savant just saying if someone is asking for something, they are probably asking for good reason
# Feb 25th 2018, 20:11 Sigfried84 enjoy it :D
# Feb 25th 2018, 20:11 Sigfried84 ok ;)
# Feb 25th 2018, 20:11 savant good luck!
# Feb 25th 2018, 20:11 savant im going to go eat breakfast now
# Feb 25th 2018, 20:11 savant okay dont show me it then
# Feb 25th 2018, 20:11 Sigfried84 but it does not include any relation statement...cake bake deduces everything
# Feb 25th 2018, 20:10 savant yes
# Feb 25th 2018, 20:10 Sigfried84 the sql?
# Feb 25th 2018, 20:10 savant the create table calls
# Feb 25th 2018, 20:10 Sigfried84 how?
# Feb 25th 2018, 20:10 savant can you show the exact schema for your tables?
# Feb 25th 2018, 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 :)
# Feb 25th 2018, 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,
# Feb 25th 2018, 19:59 savant but you’d be treating the authors as a pivot table in a sense
# Feb 25th 2018, 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
# Feb 25th 2018, 19:58 savant If you can explain what exactly you’re trying to do there, maybe someone can help with that specific problem
# Feb 25th 2018, 19:58 savant there isnt a way to create a join table two models deep
# Feb 25th 2018, 19:57 savant the answer is “no”
# Feb 25th 2018, 19:57 savant Sigried84: for your question “Does a model authors_author_types_books work?”
# Feb 25th 2018, 19:52 savant I can help you for money
# Feb 25th 2018, 19:52 savant hi!