Closed marios88 closed 1 year ago
Interesting, I will take a look.
You have to invoke runQuery yourself then on the PDO instance, obtain it like this:
$pdo = R::getDatabaseAdapter()->getDatabase()->getPDO();
https://redbeanphp.com/api/classes/RedBeanPHP.Driver.RPDO.html#method_getPDO
I think that should work?
Yea runQuery
with noFetch could work, its protected but thats ok, i already inject an extended RPDO
columnCount will allways be 0 on inserts, correct? https://github.com/gabordemooij/redbean/blob/c706a13cd66c5a769b77e12d34b8e74bc3b9cfe0/RedBeanPHP/Driver/RPDO.php#L184
So this should be outside the if columnCount
https://github.com/gabordemooij/redbean/blob/c706a13cd66c5a769b77e12d34b8e74bc3b9cfe0/RedBeanPHP/Driver/RPDO.php#L186
I have run into this "bug" when using transactional grouped inserts https://bugs.php.net/bug.php?id=61613
But unfortunately i cannot access the prepared statement to run
nextRowset()
For now my solution is to run each insert in a loop, but i am looking for a more elegant solution