Log message #4103266

# At Username Text
# Dec 13th 2017, 16:52 kailas wait, ok, in the entity , _accessible[‘*’=>true]. however, when i look at the $x3order object at runtime, there’s a ‘accessible’ element, and ‘requested_delivery_date’ is not in the array
# Dec 13th 2017, 16:50 kailas ok, will try deleting the cache
# Dec 13th 2017, 16:49 kailas hrm
# Dec 13th 2017, 16:49 hmic - i suppose the requested_delivery_date field has been added lately
# Dec 13th 2017, 16:49 hmic if so, delete the orm cache
# Dec 13th 2017, 16:49 hmic check the patched entity before saving, is the data in there?
# Dec 13th 2017, 16:49 hmic thats the typical problem with fields beeing ignored by patchentity
# Dec 13th 2017, 16:48 kailas I can’t figure out why date would work and the other datetime wouldn’t work…
# Dec 13th 2017, 16:48 kailas well, ‘*’ i true, and only ‘id’ is false
# Dec 13th 2017, 16:47 kailas yes
# Dec 13th 2017, 16:47 kailas lemme chck
# Dec 13th 2017, 16:47 hmic check the entity class
# Dec 13th 2017, 16:47 kailas I don’t see any validation errors either, after creating the entity
# Dec 13th 2017, 16:47 hmic kailas: is the property accessible?
# Dec 13th 2017, 16:46 kailas I have a model X3Orders with two datetime fields, date and requested_delivery_date. when patchEntity with [‘date’=>’2017-01-01 01:00,‘requested_delivery_date’=>‘2017-01-01 01:00’], the value for ->date is set, but not for ->requested_delivery_date . i don’t have useLocaleParser set. any ideas what could be going on?
# Dec 13th 2017, 15:44 salewilliam09 Difficult for customize QueryBuilder.
# Dec 13th 2017, 15:42 salewilliam09 @hmic (IRC) Yes, we need change "alias" for Tags.
# Dec 13th 2017, 15:39 hmic salewilliam09: alias them differently
# Dec 13th 2017, 15:31 slackebot as pt WHERE pt.tag_id IN(Tags.id) OR pt.tag_id IN (SELECT id FROM tags t WHERE t.parent_id = Tags.id)) > 0 ORDER BY Tags.order_NO asc We changed alias table Tags is tags,t,ect..., after all alias replace only one "tags" or "t" Thanks,
# Dec 13th 2017, 15:31 salewilliam09 Dear all, We have small issue under Cake\ORM\Query, how to execute 2 or 3 same table in once QueryBuilder. Original query: SELECT Tags.id AS "Tags__id", Tags.value AS "Tags__value", ( SELECT count(pt.paper_id) FROM paper_tags as pt WHERE pt.tag_id IN(Tags.id) OR pt.tag_id IN (SELECT id FROM tags t WHERE t.parent_id = Tags.id)) as totalTags FROM tags tags WHERE (Tags.parent_id) IS NULL AND ( SELECT count(pt.paper_id) FROM paper_tags
# Dec 13th 2017, 15:19 dereuromark keep it simple, constants make it harder to test as once defined you cant get rid of it, so use them only if even in tests they cannot change ever
# Dec 13th 2017, 15:19 dereuromark meowcate: in 2.x ages I also nano-optimized too much here, the usage is the same in total time, even if used 1000x times there is no real issue to measure compared to the rest of the framework request cycle.
# Dec 13th 2017, 14:55 meowcate I'll give it a try then
# Dec 13th 2017, 14:49 hmic you can have the config used in classes at initialize time, like *lots* of classes in cakephp do
# Dec 13th 2017, 14:45 meowcate So far I always use Configure, because I didn't have to call it often. Here, it could make the code harder to read.
# Dec 13th 2017, 14:43 meowcate I'll have to use those values many times. That's why I think it's better to use constants than calling Configure::read() each time.
# Dec 13th 2017, 14:41 hmic there are very very few instances where you would really want a constant
# Dec 13th 2017, 14:40 hmic i'd say cleaner would be using Configure, not constants
# Dec 13th 2017, 14:40 meowcate Thanks for the answer, an new file seems to be cleaner then
# Dec 13th 2017, 14:36 hmic or rather create your own file and include it from bootstrap.php only
# Dec 13th 2017, 14:35 hmic if thats not what you want, bootstrap.php is the place to put it for sure
# Dec 13th 2017, 14:35 hmic meowcate: configure::read() and set the info up in app.php?
# Dec 13th 2017, 14:34 jkpatel291289 may be you can use bootstrap.php
# Dec 13th 2017, 14:28 meowcate If I want to define some constants for all my app, what would be the right place to add it ? the only file in /config that have constants is paths.php, but I prefer to keep... only paths in it.
# Dec 13th 2017, 13:23 jkpatel291289 on my form
# Dec 13th 2017, 13:22 jkpatel291289 so i createcd this separate acxtion to call within the ajax code
# Dec 13th 2017, 13:22 jkpatel291289 i have a from on which i want to add option to select trucks..
# Dec 13th 2017, 13:19 hmic now you dont even need an action for it, but can decide what to do on the request type in the very same action displaying the control - just saying
# Dec 13th 2017, 13:18 hmic looks good
# Dec 13th 2017, 13:17 jkpatel291289 this worked, thanks
# Dec 13th 2017, 13:17 jkpatel291289 return $this->response->withType('application/json') ->withStringBody(json_encode($resultsArr));