Log message #4122576

# At Username Text
# Mar 7th 2018, 00:19 dereuromark in the tables
# Mar 7th 2018, 00:18 rafael.junqueira.sant where is this file, that is created by bake command line?
# Mar 7th 2018, 00:17 rafael.junqueira.sant where can I write code for relations, so a controller can contain a related table?
# Mar 7th 2018, 00:16 dereuromark You can write one :slightly_smiling_face:
# Mar 7th 2018, 00:16 dereuromark Nah, if it aint in the docs, then probably not even on some blog posts
# Mar 7th 2018, 00:16 rafael.junqueira.sant haha
# Mar 7th 2018, 00:15 dereuromark oh and here I thought its the latest `js framework` I missed
# Mar 7th 2018, 00:14 rafael.junqueira.sant @dereuromark, do you know a guide somewhere for cases like this?
# Mar 7th 2018, 00:13 rafael.junqueira.sant I feel bad to bend the english name like that as well, but since I don't know yet how it will affect the whole not to bend it...
# Mar 7th 2018, 00:12 rafael.junqueira.sant haha dereuromark, these are the initial of my middle name and surname
# Mar 6th 2018, 23:59 dereuromark Bending the "english" language too much for the sake of one line less - I usually dont go that way.
# Mar 6th 2018, 23:58 dereuromark as for your issue: you can always define things manually - this way you go around the conventions - if it helps in a situation why not
# Mar 6th 2018, 23:57 dereuromark @rafael.junqueira.sant the fact that you have `js` in your name makes me wanna run away :P
# Mar 6th 2018, 23:56 dereuromark you can composer require that branch and test it on your project
# Mar 6th 2018, 23:55 etipaced Ok. I’ve never contributed before, so I’ll see about getting things setup so I can review.
# Mar 6th 2018, 23:54 rafael.junqueira.sant @dereuromark, can you help me with the question I asked above?
# Mar 6th 2018, 23:52 dereuromark you can also confirm if it works the way you want/need it
# Mar 6th 2018, 23:52 dereuromark yes, it does
# Mar 6th 2018, 23:51 etipaced Definitely related. Does 10877 need contribution still?
# Mar 6th 2018, 23:45 dereuromark seems related to https://github.com/cakephp/cakephp/pull/11780 and https://github.com/cakephp/cakephp/issues/10877
# Mar 6th 2018, 23:43 etipaced What is the correct way to convert user data into UTC?
# Mar 6th 2018, 23:43 etipaced When user supplied datetime values are marshaled into entity properties as FrozenTime objects, Cake is assuming the timezone is UTC, but this isn’t the case as the user is assuming that the value is in PST. So my object is erroneous: ``` object(Cake\I18n\FrozenTime) { 'time' => '2018-04-01T16:00:00+00:00', 'timezone' => 'UTC', 'fixedNowTime' => false } ```
# Mar 6th 2018, 22:58 rafael.junqueira.sant the documentation has an example with users (user_favorite_pages), but in this case the controller will be able to contain the Users data, but in my case, what makes me confused is what is the convention for multiple words tables so they can be contained by the controllers they are related to
# Mar 6th 2018, 22:52 rafael.junqueira.sant Hello! I have the following situation: a page named For Whom. I wanted to call the table for_whoms, and the table with translations I'd call for_whom_translations, is this the right way to do it? I want ForWhomTranslationsController to contain ForWhoms and be able to access it.
# Mar 6th 2018, 22:16 savant What orm code are you running now and what is the query it generates?
# Mar 6th 2018, 22:16 slackebot view_count >= 10) and if i run something like that in the database gives all the columns so i just assumed that is how it would be.
# Mar 6th 2018, 22:16 ank068 That makes sense, but according to the documentation this: $query = $articles->find() ->where(function ($exp) { $orConditions = $exp->or_(['author_id' => 2]) ->eq('author_id', 5); return $exp ->add($orConditions) ->eq('published', true) ->gte('view_count', 10); }); produces this: SELECT \* FROM articles WHERE ( (author_id = 2 OR author_id = 5) AND published = 1 AND
# Mar 6th 2018, 22:12 ricksaccous oh i didn't know that since i never manually join, hehe
# Mar 6th 2018, 22:12 savant if you manually join, you need to add `->select()` with the appropriate columns
# Mar 6th 2018, 22:12 ricksaccous or if you manually join them like you did
# Mar 6th 2018, 22:12 ricksaccous @ank068 you are supposed to define associations in the TimeClocks Table class, then you can reference them in a contain
# Mar 6th 2018, 22:07 savant I would instead use `contain()` for this instead of manually creating a leftJoin.
# Mar 6th 2018, 22:07 savant You didn’t specify that you wanted the Employees columns as well
# Mar 6th 2018, 22:07 savant If you dont specify columns, it will use the table’s columns
# Mar 6th 2018, 22:06 savant It retrieves all the columns specified
# Mar 6th 2018, 22:06 savant No
# Mar 6th 2018, 22:06 ank068 Isn't the find() function suppose to make it like "select * from TimeClocks..."? Why is the "*" not happening?
# Mar 6th 2018, 22:02 ank068 @ricksaccous That worked for Employees but not for Positions. Gives me an error saying that positions is not associated with TimeClocks.
# Mar 6th 2018, 21:51 ricksaccous try a contain of Employees after left join?
# Mar 6th 2018, 21:49 ank068 File uploaded https://cakesf.slack.com/files/U91GR08DV/F9LLMFF1V/-.txt / https://slack-files.com/T053DPNCM-F9LLMFF1V-3956a14658 - Just gives me the columns from TimeClocks table
# Mar 6th 2018, 21:48 ank068 Anyone know how to get all the columns from all tables on a left join using querybuilder?