Doctrine 1
  1. Doctrine 1
  2. DC-874

Allow parameters to be passed to Doctrine_Query::select()

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major 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.

        Activity

        Hide
        Piotr Leszczyński added a comment -

        I believe this should be major improvement for Doctrine. Without this feature, some queries can't be created.

        Show
        Piotr Leszczyński added a comment - I believe this should be major improvement for Doctrine. Without this feature, some queries can't be created.

          People

          • Assignee:
            Guilherme Blanco
            Reporter:
            Gerry Vandermaesen
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: