Log message #4192551

# At Username Text
# Jul 9th 2019, 18:49 brian493 figured it out, I was resetting auto increment which basically breaks transactions in mysql
# Jul 9th 2019, 18:43 devito is it possable to set up a mysql tunnel in 3.x?
# Jul 9th 2019, 18:43 half2me bit the weird part is it doesnt fail when the atomicity is false
# Jul 9th 2019, 18:34 genellern Yeah, I also had the same issue when it had to rollback a transaction, I'll try it again on Friday and let you know what I find
# Jul 9th 2019, 18:17 gunner1095 I doubt it would take more than a couple of hours to diagnose. Anyway, good luck! Sorry I couldn't help.
# Jul 9th 2019, 18:15 brian493 it'll take me longer to diagnose cake than it will to rewrite my code with PDO :P I was just hoping there was something obvious someone here might point out
# Jul 9th 2019, 18:14 gunner1095 If you have debug kit installed you can view the sql logs there. If not, you could enable query logging and then examine the log files to see if there are any clues.
# Jul 9th 2019, 18:13 brian493 I'm just using PDO directly
# Jul 9th 2019, 18:13 brian493 I have transactions working on other (non-cake) apps on this machine
# Jul 9th 2019, 18:12 brian493 idk
# Jul 9th 2019, 18:12 gunner1095 And there are no hints to what the problem is in the query log, or debug log?
# Jul 9th 2019, 18:11 brian493 it's problematic because I'm generating about a million rows and it takes a while and I don't want my users to see incomplete data while the script runs
# Jul 9th 2019, 18:10 brian493 but it don't work, just runs all my queries as if there was no transaction
# Jul 9th 2019, 18:10 brian493 $conn = $this->Model->getDataSource();
# Jul 9th 2019, 18:10 brian493 according to the docs cake2 is the exact same except the first line is different
# Jul 9th 2019, 18:10 gunner1095 That's it.
# Jul 9th 2019, 18:10 gunner1095 $conn->commit();
# Jul 9th 2019, 18:10 gunner1095 sql stuff
# Jul 9th 2019, 18:09 gunner1095 $conn->begin();
# Jul 9th 2019, 18:09 gunner1095 $conn = ConnectionManager::get('default');
# Jul 9th 2019, 18:09 gunner1095 In cake 3 I just do...
# Jul 9th 2019, 18:07 brian493 I'll just rewrite my code with PDO it's not a huge deal
# Jul 9th 2019, 18:07 brian493 idk what I'm doing wrong I'm following the directions verbatim but they just act as if I'm not in a transaction
# Jul 9th 2019, 18:06 gunner1095 Transactions are pretty straight forward in cake 3, not sure about 2.
# Jul 9th 2019, 18:05 brian493 ok, failing that anybody know on hand how to just access the PDO object directly so I can write my own code?
# Jul 9th 2019, 18:02 brian493 anybody have experience with them?
# Jul 9th 2019, 18:02 brian493 still struggling to get transactions to work in cake2
# Jul 9th 2019, 15:55 gunner1095 Hi, can anyone help me with an issue I'm having with custom data types?
# Jul 9th 2019, 15:15 neon1024 The more you look at the clock, the slower time moves :thinking_face:
# Jul 9th 2019, 15:15 neon1024 Probably ill advised I’d imagine
# Jul 9th 2019, 15:15 neon1024 Or nuke the site from orbit I suppose and destroy the instance in the registry
# Jul 9th 2019, 15:13 neon1024 So you do have to `removeBehavior` execute code `addBehavior` again after
# Jul 9th 2019, 15:13 neon1024 As it’s using the Registry Pattern, the instance will be stored and returned if it already exists
# Jul 9th 2019, 15:13 neon1024 The answer I think is, yes, if you remove a behaviour it will effect all instances of that class
# Jul 9th 2019, 15:12 ricksaccous lol
# Jul 9th 2019, 15:12 neon1024 Well you’ve done a super job at repeating my question though 8)
# Jul 9th 2019, 15:12 ricksaccous meh i'm bad at explaining
# Jul 9th 2019, 15:11 ricksaccous i mean, for code executed afterwards you won't have it
# Jul 9th 2019, 15:11 ricksaccous lol
# Jul 9th 2019, 15:11 ricksaccous I'd imagine once you disable a behavior for code executed afterwards it works fine, if it never reaches the code where you are removing it you're fine
# Jul 9th 2019, 15:09 neon1024 Can I disable a behaviour just for a single bit of code? Or is that a matter of removing it and readding it