j4mie / idiorm

A lightweight nearly-zero-configuration object-relational mapper and fluent query builder for PHP5.
http://j4mie.github.com/idiormandparis/
2.01k stars 369 forks source link

Named placeholders and raw_query #219

Closed mgalang closed 10 years ago

mgalang commented 10 years ago

Named placeholders does not work anymore when using raw_query

ref: https://github.com/j4mie/idiorm/blob/master/idiorm.php#L415

commit: 6a9b77c8a09e95af9c14f7ccd2c1ca00b1770fd2:

Yep, that is gonna be the case - I hadn't noticed before. The problem here is the the for loop is trouncing the named param with a ordered/positional/integer one.

charsleysa commented 10 years ago

This has been fixed but the unit tests and query logging do not currently support named parameters, as far as I know they never have.

treffynnon commented 10 years ago

That is right, @charsleysa , the query logging doesn't support this, which means that the unit tests can't really be written. We would need to make the logger understand placeholders before we could write tests unfortunately.