Log message #4055814

# At Username Text
# Jul 22nd 2017, 16:53 iblumbo yeah yeah I know its an overhead, it's just for one academic assignment haha
# Jul 22nd 2017, 16:44 hmic yeah, play things you can't on workdays
# Jul 22nd 2017, 16:43 birdy247 I am working with Guzzle
# Jul 22nd 2017, 16:43 birdy247 experimenting!
# Jul 22nd 2017, 16:43 birdy247 I like staurdays for this
# Jul 22nd 2017, 16:43 birdy247 :slightly_smiling_face:
# Jul 22nd 2017, 16:43 hmic birdy247: not working really, just in the office, playing with alexa and building a philips hue emulator gadget at the moment
# Jul 22nd 2017, 16:42 hmic entities are supposed to be as lightweight as possible (value objects). you do have getter/setters available though. you can overwrite whatever you want with specifying your own getter/setter methods technically making the properties private. but i dont see any use for that and it introduces lots of (unneccessary) additional overhead
# Jul 22nd 2017, 16:42 birdy247 saturday working?
# Jul 22nd 2017, 16:41 birdy247 Hey hmic
# Jul 22nd 2017, 16:41 hmic still: whats the reasoning?
# Jul 22nd 2017, 16:39 iblumbo Got it! Do you think there's a way to make every entity property private by default and create getter and setters to them in cake v3
# Jul 22nd 2017, 16:17 hmic you can add private methods and variables to an entity. they will not get persisted to the db or set though
# Jul 22nd 2017, 16:16 hmic iblumbo, whats the reasoning?
# Jul 22nd 2017, 16:09 iblumbo is it possible to encapsulate (make private) the properties from an Entity ?
# Jul 22nd 2017, 13:15 slackebot $name)); $conds['OR'][] = $concat;
# Jul 22nd 2017, 13:15 itamer My broken code so far $conds['OR']['Memberships.name'] = $name; //$conds['OR']["CONCAT(Individuals.firstname,' ',Individuals.lastname)"] = $name; $query = $this->Leads->find()->innerJoinWith('Individuals'); $concat = $query->func()->concat('Individuals.firstname' => 'identifier',' ','Individuals.lastname' => 'identifier']); debug($concat); //debug($query->like($
# Jul 22nd 2017, 13:13 itamer I'm going to need to change the way I run my queries. For the complex stuff I generally work through all the logic and build up $conds as necessary, $fields etc and then run it. This version seems to want a query written for each possible combination but maybe I'm missing the flexibility of it because I'm still way, way too new.
# Jul 22nd 2017, 12:49 birdy247 should I expect table object to be called in the through model?
# Jul 22nd 2017, 12:49 birdy247 If I am saving a belongsToMany with the "through" option
# Jul 22nd 2017, 12:41 Guest68527 so A is not directly belong to C but using AB it belongs to ABC
# Jul 22nd 2017, 12:40 Guest68527 AB belong to many C by ABC table
# Jul 22nd 2017, 12:40 Guest68527 so A belongs to many B using table AB
# Jul 22nd 2017, 12:39 Guest68527 Thanks Admad, but my problem is little different. While entering a course, first user can create course, the register course for each session. that register course can be available in multiple language
# Jul 22nd 2017, 12:35 itamer @admad thank you though, I appreciate having a prompt response
# Jul 22nd 2017, 12:35 itamer midnight might not be the best time to be reading that. Very diff from v1.2 and v2. I've got my work cut out for me!
# Jul 22nd 2017, 12:35 admad Guest68527: https://book.cakephp.org/3.0/en/orm/retrieving-data-and-resultsets.html#filtering-by-associated-data
# Jul 22nd 2017, 12:32 Guest68527 admad, can you plz help me
# Jul 22nd 2017, 12:28 itamer The other thing people will enter is "Sarah Smith and John Doe" which may actually be a match for another field (but not this one)
# Jul 22nd 2017, 12:28 admad https://book.cakephp.org/3.0/en/orm/query-builder.html#using-sql-functions
# Jul 22nd 2017, 12:27 itamer I'll go back to that if I have to
# Jul 22nd 2017, 12:27 itamer It's a quick and easy form for people to enter but I've wanted to avoid having to work out if "Sarah de Smith" or "Sarah van Smith" or "Sarah Jane Smith" has been entered - the concat worked just fine before but we've upgraded.
# Jul 22nd 2017, 12:25 admad @itamer why concat instead of just using firstname => 'Sarah' and 'lastname' => 'Smith' in conditions?
# Jul 22nd 2017, 12:21 itamer I want to add this to my $conds array and pass it into the query 'CONCAT(Individuals.firstname,' ',Individuals.lastname)' => 'Sarah Smith' but when it gets parsed into the query it comes out as CONCAT(Individuals.firstname,' ',individuals.lastname) :c1 and fails because there is no operator between the concat statement and the variable I'm guessing it's the concat that throws it out. Any workarounds?
# Jul 22nd 2017, 12:05 Guest68527 For example two tables are courses, sessions are related by courses_sessions, and courses_sessions belongs to mediums table
# Jul 22nd 2017, 12:03 sonu_nk hmic, is AppController.php -> intilize() is not right place to it ? i dont have any knowledge about middleware...why to use and how to use...
# Jul 22nd 2017, 12:03 Guest68527 How query and all other thing work in this case
# Jul 22nd 2017, 12:03 Guest68527 Is it possible to use A belongs to many B By table AB and AB belongs to many C
# Jul 22nd 2017, 12:01 hmic you could have a middleware too
# Jul 22nd 2017, 12:00 sonu_nk i want to call a common method automatically on each request, AppController.php is the right place ? and should call that method in initialize() ??? right?
# Jul 22nd 2017, 11:59 Guest68527 Hello