Closed FlipEverything closed 5 years ago
I improved the "function detector" to work with complex queries. I changed the basic tests to be platform independent and added complex function tests for the three tested drivers.
summon @vlucas
ping
Sorry I was in Montivideo, Uruguay on a work trip for a week. I am back now :)
Thank you! Sorry, I did not mean to bother you.
It would be really nice if you could order by a built-in (or user-defined) driver function. Currently
count()
andgroup()
only works with fields specified in the entity's definition becausefieldAliasMapping()
appends the tableName before the fieldName. If the fieldName happens to be a function then it does not work. I implemented a simple "function detector" that works with one parameter (mysql) functions. It does not work with complex functions.This way you can do something like this:
It translates to this:
instead of
This is 100% backwards compatible and it does not break the field alias support. What do you guys think?