# |
Jun 29th 2017, 06:03 |
savant |
:( |
# |
Jun 29th 2017, 06:02 |
Sebollson |
in both cases I have to rollback |
# |
Jun 29th 2017, 06:02 |
Sebollson |
and target entity |
# |
Jun 29th 2017, 06:02 |
Sebollson |
during saving of audit entity |
# |
Jun 29th 2017, 06:02 |
Sebollson |
and I have 2 possible points of failure |
# |
Jun 29th 2017, 06:02 |
Sebollson |
its about audits |
# |
Jun 29th 2017, 06:02 |
Sebollson |
i have to |
# |
Jun 29th 2017, 06:02 |
savant |
but that should work |
# |
Jun 29th 2017, 06:02 |
Sebollson |
:) |
# |
Jun 29th 2017, 06:02 |
savant |
YOLODB |
# |
Jun 29th 2017, 06:02 |
savant |
i dont use transactions usually |
# |
Jun 29th 2017, 06:01 |
savant |
so if the dispatchEvent rolls it back, then you’re fine |
# |
Jun 29th 2017, 06:01 |
savant |
checks to see if we’re in a transaction |
# |
Jun 29th 2017, 06:01 |
savant |
because this line: https://github.com/cakephp/cakephp/blob/master/src/ORM/Table.php#L1852 |
# |
Jun 29th 2017, 06:00 |
Sebollson |
lets try it out |
# |
Jun 29th 2017, 06:00 |
Sebollson |
#ic |
# |
Jun 29th 2017, 06:00 |
savant |
$this->getConnection()->rollback() |
# |
Jun 29th 2017, 06:00 |
Sebollson |
exception ? |
# |
Jun 29th 2017, 06:00 |
savant |
you can do something like |
# |
Jun 29th 2017, 06:00 |
savant |
*afterSave |
# |
Jun 29th 2017, 06:00 |
savant |
in your afterSAVE |
# |
Jun 29th 2017, 05:59 |
savant |
holdon |
# |
Jun 29th 2017, 05:59 |
Sebollson |
;/ |
# |
Jun 29th 2017, 05:59 |
Sebollson |
in general afterSave result is neglected |
# |
Jun 29th 2017, 05:59 |
Sebollson |
hmm |
# |
Jun 29th 2017, 05:58 |
savant |
i think https://github.com/cakephp/cakephp/blob/master/src/ORM/Table.php#L1827 |
# |
Jun 29th 2017, 05:58 |
Sebollson |
I got AuditBehavior attached to table |
# |
Jun 29th 2017, 05:58 |
Sebollson |
now something seems not right |
# |
Jun 29th 2017, 05:58 |
savant |
ah you’re right |
# |
Jun 29th 2017, 05:57 |
Sebollson |
shouldnt it be in afterSaveCommit ? |
# |
Jun 29th 2017, 05:57 |
savant |
isnt the transaction already committed by the time you get to aftersave? |
# |
Jun 29th 2017, 05:56 |
Sebollson |
Is there a away to rollback transaction from behavior on afterSave event ? |
# |
Jun 29th 2017, 05:56 |
Sebollson |
Hi |
# |
Jun 29th 2017, 05:52 |
savant |
its invite only but works well |
# |
Jun 29th 2017, 05:52 |
savant |
i use an app called screenhero |
# |
Jun 29th 2017, 05:52 |
savant |
since I think all of that should work |
# |
Jun 29th 2017, 05:52 |
savant |
if you want to, you can send me your email and I can “remote-control” your computer for you to figure out whats going on |
# |
Jun 29th 2017, 05:52 |
aproapedelune |
https://gist.github.com/anonymous/b7c6d14dab380daa68fb11400613ec67 and this is admin.ctp |
# |
Jun 29th 2017, 05:51 |
aproapedelune |
https://gist.github.com/anonymous/a3cbc5c9fd513fffde8980385fa2c428 |
# |
Jun 29th 2017, 05:50 |
aproapedelune |
login.ctp? |
# |
Jun 29th 2017, 05:49 |
savant |
can you gist your template? |