Details
-
Type:
Improvement
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: Query
-
Labels:None
-
Environment:Any
Description
While I believe it's not so extraordinary to have parameters in a SELECT clause, Doctrine_Query::select() does not allow to pass parameters, next to the SELECT clause. You can still pass any parameters to execute(), but I do believe it would be nice to be able to pass the parameter values right away to select() as you can with where() etc.
Example:
Doctrine_Query::create()>select('f.*, (f.id = ?) AS selected'))>from('Foo f')->execute(array($selected_id));
This principle would apply to any select-field that has a calculated value that comes from a parameter.
I believe this should be major improvement for Doctrine. Without this feature, some queries can't be created.