Log message #4055800

# At Username Text
# 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
# Jul 22nd 2017, 11:51 Guest68527 SomeOne expert here who can help me?
# Jul 22nd 2017, 11:43 ksandeep anyone is online
# Jul 22nd 2017, 11:43 ksandeep plz help how to setup
# Jul 22nd 2017, 11:43 ksandeep all have belong to many relation
# Jul 22nd 2017, 11:43 ksandeep so again relation is with courses_seesions table with mediums table
# Jul 22nd 2017, 11:42 ksandeep Now at same time i have to store data like medium where one course available in multiple lang.
# Jul 22nd 2017, 11:41 ksandeep I have two table course and session. Then have table courses_sessions which take data for course which change session to session
# Jul 22nd 2017, 11:40 ksandeep I need help in table setup. how to give relation plz help
# Jul 22nd 2017, 11:39 ksandeep Hi All
# Jul 22nd 2017, 10:31 crazycoder thanks
# Jul 22nd 2017, 10:31 crazycoder ok i will use a foreach()
# Jul 22nd 2017, 10:30 birdy247 It currently not happening
# Jul 22nd 2017, 10:30 crazycoder can i exit a loop inside collection->each() ?
# Jul 22nd 2017, 10:30 crazycoder hello