# |
May 19th 2017, 00:36 |
royalty |
wew |
# |
May 19th 2017, 00:36 |
royalty |
by finding someone else who already figured it out |
# |
May 19th 2017, 00:36 |
royalty |
i figured out how to filter on join data http://stackoverflow.com/questions/31643906/cakephp-3-x-hasmany-through-association-find |
# |
May 19th 2017, 00:28 |
royalty |
if you have the behavior set |
# |
May 19th 2017, 00:28 |
royalty |
anyways created and modified should get autofilled |
# |
May 19th 2017, 00:27 |
royalty |
i don't think you understood me |
# |
May 19th 2017, 00:27 |
royalty |
huh |
# |
May 19th 2017, 00:27 |
FThoc |
as book says |
# |
May 19th 2017, 00:26 |
FThoc |
royalty, I create these files manually. |
# |
May 19th 2017, 00:25 |
Leonardo_0112 |
Well, I got it! it's a Router::connect '/baz/:action/*' that was causing it. Solved! |
# |
May 19th 2017, 00:21 |
Leonardo_0112 |
Hi! I've a question in this pastebin: https://pastebin.com/McdxavfK |
# |
May 19th 2017, 00:10 |
royalty |
let the ORM do it for you |
# |
May 19th 2017, 00:10 |
royalty |
there is no need to set/unset them for any reason |
# |
May 19th 2017, 00:10 |
royalty |
just make sure you aren't altering them |
# |
May 19th 2017, 00:10 |
FThoc |
touch? |
# |
May 19th 2017, 00:10 |
royalty |
are you doing anything to touch the values before save? |
# |
May 19th 2017, 00:10 |
royalty |
okay |
# |
May 19th 2017, 00:10 |
FThoc |
created and modified |
# |
May 19th 2017, 00:09 |
FThoc |
yep |
# |
May 19th 2017, 00:09 |
FThoc |
it was here from the beginning |
# |
May 19th 2017, 00:09 |
royalty |
do you have a created datetime field |
# |
May 19th 2017, 00:09 |
FThoc |
Yep, I add it but no effect |
# |
May 19th 2017, 00:09 |
royalty |
$this->addBehavior('Timestamp'); |
# |
May 19th 2017, 00:09 |
royalty |
the TimeStamp behavior |
# |
May 19th 2017, 00:09 |
royalty |
yeah you just need to add the behavior in initialize |
# |
May 19th 2017, 00:07 |
FThoc |
I add that behavior via myphpadmin, but that's not good |
# |
May 19th 2017, 00:06 |
FThoc |
new article entity should has timestamped fields, but it's not |
# |
May 19th 2017, 00:06 |
FThoc |
I got it |
# |
May 19th 2017, 00:06 |
FThoc |
a |
# |
May 19th 2017, 00:05 |
FThoc |
now format() always get NULL in "created" field |
# |
May 19th 2017, 00:04 |
royalty |
cool |
# |
May 19th 2017, 00:04 |
royalty |
ah okay so you fixed it I guess? |
# |
May 19th 2017, 00:04 |
royalty |
from the table |
# |
May 19th 2017, 00:04 |
FThoc |
yep, that problem gone/overlapped by another problem |
# |
May 19th 2017, 00:04 |
royalty |
gist your initialize method |
# |
May 19th 2017, 00:04 |
FThoc |
yep |
# |
May 19th 2017, 00:04 |
royalty |
in the initialize method |
# |
May 19th 2017, 00:04 |
FThoc |
I copy some code from "bookmarks example" somethin' about belongsTo and belongsToMany |
# |
May 19th 2017, 00:03 |
FThoc |
I did as book says |
# |
May 19th 2017, 00:02 |
FThoc |
how? |
# |
May 19th 2017, 00:02 |
royalty |
FThoc, do you have the associations set up in the table class? |